Manage asynchronous processing
Some Amazon transactions are processed asynchronously, but only if specific conditions are met:
- Payment authorization -
canHandlePendingAuthorizationparameter is set to true on Update Checkout Session or Create Charge
- Payment capture - payment is captured more than 7 days after authorization
- Refunds - all refunds are processed asynchronously
If a transaction is processed asynchronously, Amazon Pay will return an object in an initiated state until processing is complete. To determine if the operation was successful, you must either set up Instant Payment Notifications, or implement a polling mechanism to query the respective GET API for updates. If you plan on polling for updates, we recommend making a request once every hour. You can adjust the interval to meet your business requirements.
Manage asynchronous authorizations
Asynchronous authorizations can take up to 24 hours to process but it may result in lower decline rates as it gives Amazon Pay more time to investigate transactions. If authorization results are pending and the final processing status is not available in real time, show an order confirmation page to the buyer immediately. Poll Get Charge or listen for a Charge IPN for final processing state.
If authorization results are pending, the Charge object will start in AuthorizationInitiated state before moving to an Authorized, Declined, or Canceled state. If Charge transitions to an Authorized state, payment authorization was successful. If Charge transitions to Declined or Canceled state, payment authorization was not successful: cancel the order and ask the buyer to checkout again using a different payment method.
Manage asynchronous captures
The Charge object will start in CaptureInitiated state before moving to a Captured or Declined state. If Charge transitions to Captured state, payment capture was successful. If Charge transitions to Declined state, payment capture was not successful: cancel the order and ask the buyer to checkout again using a different payment instrument.
Manage asynchronous refunds
The Refund object will start in RefundInitiated state before moving to Refunded or Declined state. If Refund transitions to Refunded state, payment refund was successful. If Refund transitions to Declined state, payment refund was not successful: issue a refund using an alternate method (for example, a gift card or store credit).