Step 8: Request a capture
You can request a capture to charge the buyer any time as per your billing or subscription logic. The billing agreement allows you the flexibility to charge the buyer a variable amount as often as needed by your business, whether weekly, monthly, or yearly.
After you successfully call the AuthorizeOnBillingAgreement operation and the Authorization object is in the Open state, you can capture funds against that authorization. You can call the AuthorizeOnBillingAgreement operation with the CaptureNow parameter set to true to immediately capture funds. Otherwise, you have to request a Capture separately.
The Capture object
A Capture object represents the movement of funds from the buyer to your account. Every Capture object is associated with an Authorization object that was previously created and is still valid. At any time, the Capture object can be in one of the following four states:
- Pending - The Capture object is in the Pending state until it is processed by Amazon. If you submit a capture request within seven days of a successful authorization, Amazon immediately processes it. The synchronous response to the Capture operation indicates the Completed or Declined state. If you request a capture more than seven days from the date of successful authorization, Amazon does not process it immediately. The synchronous response to the Capture operation returns a Pending state, and it remains in this state until the request is processed by Amazon. The processing time for a capture varies and can be an hour or more. After processing is complete, Amazon notifies you of the processing status. For more information about how to receive the final capture status, see Get the capture status.
- Declined - The Capture object is in the Declined state when Amazon declines the capture request. For more information, see Step 7: Prepare to handle declined authorizations.
- Completed - The Capture object is in the Completed state when the buyer has been successfully charged. Note that if a buyer uses the direct debit payment method, Amazon Pay provides the buyer a 24-hour pre-notification period before submitting the payment request to the bank. During that period, the buyer may cancel the transaction and Amazon closes the Capture object.
- Closed - The Capture object moves to the Closed state in any of these cases:
- If Amazon Pay identifies a problem with the buyer's account.
- If the maximum amount of the capture has already been refunded.
- If the payment method is direct debit and the buyer cancels the transaction during the pre-notification period.
- If you have requested 10 partial refunds against the Capture object. The maximum amount that you can refund is the lesser of 15% or €75 above the captured amount. No refunds are allowed against the capture after it is moved to the Closed state.
For more information about the Capture objects states and the transitions among these states, see Synchronizing your systems with Amazon Pay.
To collect the funds that were reserved in the Authorization object, you must make a Capture operation call within 30 days of a successful authorization in Production mode and within two days in Sandbox mode. Amazon strongly recommends that you capture funds within seven days of authorization to reduce the likelihood of declines.
The following example shows how to call the Capture operation:
https://mws-eu.amazonservices.com/OffAmazonPayments_Sandbox/2013-01-01
?AWSAccessKeyId=AKIAFBM3LG5JEEXAMPLE
&Action=Capture
&AmazonAuthorizationId=S23-1234567-1234567-0000001
&CaptureAmount.Amount=94.50
&CaptureAmount.CurrencyCode=EUR
&CaptureReferenceId=test_capture_1
&MWSAuthToken=amzn.mws.4ea38b7b-f563-7709-4bae-87aeaEXAMPLE
&SellerCaptureNote=Payment for Blue Shoes
&SellerId=YOUR_SELLER_ID_HERE
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2013-11-19T19:01:11Z
&Version=2013-01-01
&Signature=WlQ708aqyHXMkoUBk69Hjxj8qdh3aDcqpY71hVgEXAMPLE
For more information about the Capture operation, including the request parameters and response elements, see Capture in the Amazon Pay API reference guide.
Getting the capture status
If you submit a Capture request within seven days of a successful authorization, Amazon Pay immediately processes it. The synchronous response to your Capture request indicates the Completed or Declined state. If you request a capture more than seven days from the date of a successful authorization, Amazon does not process it immediately. The synchronous response to your Capture request returns a Pending state and remains in this state until the request is processed by Amazon. The processing time varies and can be an hour or more.
After processing is complete, Amazon Pay notifies you of the processing state through the Instant Payment Notification service. In the event that Amazon Pay cannot complete your capture request, you receive a Declined message.
For more information about declines, see Step 7: Prepare to handle declined authorizations. For more information about the Instant Payment Notification service, see Synchronizing your systems with Amazon Pay.
You then have the option to query details of the Capture object by calling the GetCaptureDetails operation using the AmazonCaptureId that was returned with the Capture response. You also need this unique identifier to refund funds against a completed capture. For more information, see GetCaptureDetails in the Amazon Pay API reference guide.
Buyer email for successful captures
Every time a capture is successful, Amazon Pay sends the buyer a Charge notification email with details about the capture.
Note: Amazon Pay lets you specify various pieces of information in the emails sent by Amazon Pay, like your customer service email address, phone number, or note from the seller. For more information about these details, see Buyer-facing email content that you can provide.
Declined and canceled captures
Declined captures
If the Capture operation call is declined, you see one of the following two reason codes included in the response:
AmazonRejected
AmazonRejected indicates that the Capture operation call was declined because of a determination made by Amazon Payments. It is likely that the Authorization object and the Billing Agreement object also are closed when Amazon Payments rejects a capture. If the authorization is closed, any further capture requests are also declined. If the billing agreement is still in the Open state, request a new authorization, and then request a capture on the authorization.
ProcessingFailure
ProcessingFailure indicates that Amazon Pay could not process the transaction because of an internal processing error. Retry your request in one to two minutes.
In the case that the Billing Agreement object is still open, we recommend submitting a new AuthorizeOnBillingAgreement operation call, followed by a new Capture operation call.
Canceled captures
If the payment type is direct debit, the buyer can cancel the payment during a 24-hour pre-notification period before the Capture request is processed. Either calling AuthorizeOnBillingAgreement with Capture=true or calling AuthorizeOnBillingAgreement and Capture operations separately results in one Order Reference object, one Authorization object, and one Capture object.
If the buyer cancels the payment, the states, reason codes, and refund types of the Order Reference, Authorization, Capture, and resulting Refund objects are set as follows:
Object | State | Reason code | Refund type |
---|---|---|---|
Order Reference | Closed | AmazonClosed | |
Authorization | Closed | MaxCapturesProcessed | |
Capture | Closed | BuyerCanceled | |
Refund | Complete | BuyerCanceled |
When you use CreateOrderReferenceForID and have multiple Authorization and Capture operations on the one Order Reference object, canceling the payment results in all Authorization and Capture operations that have a payment method of direct debit and that are within the 24-hour pre-notification period Closed with the same reason codes listed above. Refund objects are created for each Capture and processed to completion with the BuyerCanceled refund type. The Order Reference object stays open if other Authorization and Capture operations exist against it.