Gracias por tu visita. Esta página solo está disponible en inglés.

Step 10: Request a refund

You can issue full or partial refunds against previously successful Captured funds.

Note: When you have issued a refund, that amount is no longer available for authorization or capture.

After a refund is successfully processed, the Refund object is in a Completed state and a Refund notification email is sent to the buyer.

If the Refund is declined by Amazon, the Refund object is in a Declined state. For more information, see step 4, "Check the response for errors or declines" below.

There is no time limit for initiating a refund, but the longer you take to request a refund the more likely that a payment method associated with the purchase will become invalid and the refund will fail.

Note: If you infrequently run into refund scenarios, you can manually issue refunds through Seller Central in lieu of integrating the Refund API call into your workflow.


Request a refund by doing this:

  1. Make a call to the Refund API. Set the following values in the Refund request so that they appear in the buyer's Refund notification email and account status and in your Settlement and Transaction reports.
    • Refund Reference ID
    • Refund amount
    • Seller Refund Note
    Make sure that the reference ID is unique. For more information, see Handling errors from Pay with Amazon API calls .
  2. Listen for the Refund IPN message returned by Amazon. Refund requests are not processed in real time and the initial RefundStatus is always Pending. Processing time varies and can be several hours. Amazon will notify you of the processing status via an IPN message.
  3. Get Refund Details. You can query the details of a Refund object by calling the GetRefundDetails API using the AmazonRefundId that was returned with the Refund IPN message.
  4. Check the response for errors or declines. You need to handle any errors that might occur from the API call, and you need to manage any refunds that are in a Declined state. If a Refund is declined, you will see one of the following reason codes in the response:

    Amazon has rejected the refund. You should issue a refund to the buyer in an alternate manner (for example, a gift card or store credit).

    Amazon could not process the transaction because of one of the following:
    • Amazon could not process the transaction because of an internal error.
    • A refund has already been issued from an A-to-z Guarantee claim or from a chargeback.
    If you receive a ProcessingFailure reason code, check the A-to-z Guarantee claim and chargeback status for your order in Seller Central by clicking Performance. If no A-to-z claim or chargeback refund has been issued to the buyer and the Capture object is still in the Completed state, retry your request in one to two minutes. If the retry attempt does not succeed, contact the buyer and issue the refund in another way.

    For more information, see Handling errors from Amazon Pay API calls.

from pay_with_amazon.client import PayWithAmazonClient

client = PayWithAmazonClient(

response = client.refund(
  seller_refund_note='Test order.')

require 'pay_with_amazon'

merchant_id = 'YOUR_MERCHANT_ID'
access_key = 'YOUR_ACCESS_KEY'
secret_key = 'YOUR_SECRET_KEY'

client =
  sandbox: true,
  currency_code: :usd,
  region: :na

amazon_capture_id = 'S23-1234567-1234567-0000002'
refund_reference_id = 'test_refund_1'
amount = 106

  seller_refund_note: 'Lorem ipsum dolor',
  mws_auth_token: 'amzn.mws.4ea38b7b-f563-7709-4bae-87aeaEXAMPLE'