Step5 Charge, Capture, Cancel and Refund
Pleae note we use Charge as Authorization, and Capture as Settlement.
Charge
Operaiton defers by paymentIntent (Authorize/AuthorizeWithCapture/Confirm).
- Authorize
- AuthorizeWithCapture
- Confirm
Charge is already created upon checkout completion on your website. No further action is needed.
Charge is already created upon checkout completion on your website. No further action is needed.
Charge has not been created yet.
Call Create Charge API using chargePermissionId returned in Complete Checkout Session API response as a parameter.
Capture
Operaiton defers by paymentIntent (Authorize/AuthorizeWithCapture/Confirm).
- Authorize
- AuthorizeWithCapture
- Confirm
- (Others) After re-authorization
Call Capture Charge API using chargeId returned in Complete Checkout Session API response as a parameter.
Capture is already done upon checkout completion on your website. No further action is needed.
If Charge is not created yet, call Create Charge API to create Charge at first. Then,
- In case
captureNowparameter is set to true when calling Create Charge API, capture is already done. No further action is needed. - In case
captureNowparameter is set to false when calling Create Charge API, callCapture ChargeAPI usingchargeIdreturned in Create Charge API response as a parameter.
- In case
captureNowparameter is set to true when calling Create Charge API, capture is already done. No further action is needed. - In case
captureNowparameter is set to false when calling Create Charge API, callCapture ChargeAPI usingchargeIdreturned in Create Charge API response as a parameter.
- Capture will be processed asynchronously if it's initiated more than 7 days after Charge creation. See Asynchronous processing.
- In sandbox, Capture is always processed immediately. If you want to test asynchronous capture, you can do so using simulation strings which will keep state as CaptureInitiated for short time. See Integration Guide - Simulation String.
- Charge and Capture has 1:1 relationship. If checkout includes more than two goods and shipping will be split, you need to re-create Charge by each item, and Capture them respectively.
Cancel Charge
Uncaptured charge can be cancelled. Call Cancel Charge API using chargeId as a parameter.
Cancel Charge cancels the Authorization only, and it doesn't cancel the Order. If you want to cancel the order, see Cancel Order.
If Charge is already captured, but you want to cancel it, you need to refund instead. See Cancel Captured Charge = Refund
Cancel Order
Uncaptured Charge can be cancelled. Call Close Charge Permission API using chargePermissionId returned in Complete Checkout Session API response as a parameter.
If cancelPendingCharges parameter is set to true when calling Close Charge Permission API, active Charge will also be canceled at the same time.
Captured Charge cannot be cancelled. In such case, you rerund. See Cancel Captured Charge = Refund.
Cancel Captured Charge = Refund
Captured Charge cannot be cancelled. If you want to cancel such order, you need to refund. Call Create Refund API using chargeId as a parameter.
Amazon Pay processes refunds asynchronously. See asynchronous processing
In sandbox, Refund is always processed immediately. If you want to test asynchronous refund, you can do so using simulation strings which makes state as CaptureInitiated for short time. See
Integration Guide - Simulation String.
Re-authorization
Operation defers by paymentIntent (Authorize/AuthorizeWithCapture/Confirm)
- Authorize
- AuthorizeWithCapture
- Confirm
Charge is already created upon checkout completion on your website, but Charge always expires in 30 days.
If you capture charge after 30days of it's creation, call Create Charge API using chargePermissionId returned in Complete Checkout Session API response as a parameter to create new Charge at first.
As a result, you get new chargeId so you save it with order data.
- If
captureNowparameter is set to true when calling Create Charge API, Charge is created and captured at the same time. - If
canHandlePendingAuthorizationparameter is set to true when calling Create Charge, Charge is processed asynchronously
See Asynchronous processing.
Charge is already captured, so no need for re-authorization.
See Charge above.