Skip to main content

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).

Charge is already created upon checkout completion on your website. No further action is needed.



Capture

Operaiton defers by paymentIntent (Authorize/AuthorizeWithCapture/Confirm).

Call Capture Charge API using chargeId returned in Complete Checkout Session API response as a parameter.


tip
  • 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.

note

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.

info

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)

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.

info