You use Refund to refund a successfully completed payment transaction. You can refund less than the amount paid. The default, however, is to refund the full price to the buyer.
The Refund operation can be used only by the caller of the original transaction. Refunds are processed in batch so they often take a while before completing.
![]() | Note |
|---|---|
This action is an Amazon Flexible Payment Service (Amazon FPS) action. In order to execute this action, you must have an AWS Developer account. For information about how to get an account, see "Before you Begin" in the Amazon Simple Pay Getting Started Guide. |
| Parameter | Description |
Required |
|---|---|---|
|
|
A field that contains the caller's description of the transaction. Type: String Constraint: 160 characters maximum Default: None |
No |
|
|
A value you provide that uniquely identifies the request. This identifier is maintained for seven days by Amazon FPS. Type: String Contraints: 128 bytes maximum Default: None |
Yes |
|
|
Specifies the details of the refund, in particular, whether or not the caller or Amazon FPS are refunding their fees. Type: MarketplaceRefundPolicy Default: None |
No |
|
|
Specifies the amount to be refunded. The total refund amount cannot exceed the original transaction amount. If this value is not specified, Amazon FPS refunds any remaining amount from the original transaction. Type: Amount Data Types Default: None |
No |
|
| The unique ID generated by Amazon FPS and returned in response to a successful transaction. Type: String Constraint: 35 characters maximum Ancestor: RefundResult, ResponseMetadata | Yes |
You must also use parameters that are common to all requests that are described in Common Request Parameters. Parameter names are case sensitive.
| Element | Description |
|---|---|
|
| This is the ID of the transaction named in the request. Returned if the transaction is successful Type: String Constraints: 35 characters
Ancestor: RefundResult, ResponseMetadata |
|
|
Provides the status of the transaction. Always returned. Type: TransactionStatus Ancestor: ResponseMetadata |
Responses also include elements common to all responses. For more information, see Common Response Elements.
This action can return the following errors:
![]() | Note |
|---|---|
In order to provide a secure request, you must generate a signature whenever you make a call using this action. For more information, see Keeping Payments Secure |
This section shows a sample request.
https://fps.sandbox.amazonaws.com? Action=Refund &AWSAccessKeyId=AKIAIIFXJCFIHITREP4Q &CallerDescription=MyWish &CallerReference=CallerReference03 &RefundAmount.CurrencyCode=USD &RefundAmount.Value=1 &Signature=V6pU3PvDPkPhR9Eu7yZXnFZHuEFafLE5sBPgqqCELEU%3D &SignatureMethod=HmacSHA256 &SignatureVersion=2 &Timestamp=2009-10-06T05%3A51%3A49.578Z &TransactionId=14GK4TNCAQ84NK9VITEHKAS94RAD9ZE2AQD &Version=2008-09-17
This section shows a sample response to a REST request.
<RefundResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
<RefundResult>
<TransactionId>14GK6F2QU755ODS27SGHEURLKPG72Z54KMF</TransactionId>
<TransactionStatus>Pending</TransactionStatus>
</RefundResult>
<ResponseMetadata>
<RequestId>1a146b9a-b37b-4f5f-bda6-012a5b9e45c3:0</RequestId>
</ResponseMetadata>
</RefundResponse>This section shows a sample IPN notification to a REST request.
-------------------------- transactionId: 14GK6F2QU755ODS27SGHEURLKPG72Z54KMF statusMessage: The transaction was successful and the payment instrument was charged. transactionDate: 1254808324 signatureVersion: 2 signatureMethod: RSA-SHA1 parentTransactionId: 14GK4TNCAQ84NK9VITEHKAS94RAD9ZE2AQD buyerEmail: new_premium@amazon.com notificationType: TransactionStatus callerReference: CallerReference03 transactionAmount: USD 1.00 transactionStatus: SUCCESS operation: REFUND recipientEmail: test-caller@amazon.com buyerName: Test Business signature: sDq9YvW7L29W2NSIC/wjC5yLyR4QJSQyt/7iHhNiEdwFoGVkrLjJHiBloPfJxzznHnmMtCRsUQ+A d3tZ0NdemMxf0qYM9NX93PyG0KBKXShKeM0Da39cvnC05tZmtxpfCuZT5ECRydr+BqRo/DOlx1Yg 93gihZ83qHWR8bpqQcBwsu7vD4c4m4mTZ4I75gw+NXKRDD+vCPFDNEKRnh5kQz+Tjjg4bnNYEEcG Rf6UZfS2lvMzdj0c37RUY6t4gQ3W3Z9G/REGjC98JBuTimk/kc1HoSc+xe6WtAH/siNurisyqgoB HWnQM8iRqLEHj/m9y6vx5EBHBokD1BJMIiiZNg== recipientName: Test Business paymentMethod: CC certificateUrl: https://fps.sandbox.amazonaws.com/certs/090909/PKICert.pem paymentReason: MyWish statusCode: Success --------------------------