Amazon Simple Pay enables you to refund money using the Amazon Payments user interface (see the Amazon Simple Pay Getting Started Guide), or you can send a
Refund request to Amazon Flexible Payments Service. The one you choose typically depends upon the number of refunds you need to do. The more refunds you need to make, the more likely you'll prefer to do so programmatically.
This section describes how to send a Refund request to Amazon Flexible Payments Service. For more information about settling charges using the Amazon Payments user interface, see Amazon Simple Pay Getting Started Guide.
Use the following procedure to refund charges programmatically.
To refund a transaction
If the transaction was reserved, settle it now (see How to Settle Transactions Programmatically).
For more information, see Settle.
Send a Refund request similar to the following.
https://fps.amazonaws.com/? &Action=Refund &AWSAccessKeyId=
[Your access key Id]&TransactionId=208sg0849sfwers082 &RefundTransactionReference=w908dnwf092987 &Timestamp=2007-05-10T05%3A11%3A41Z &Version=
[WSDL version in the YYYY-MM-DD format]&Signature=
[calculated signature]&SignatureVersion=2 &SignatureMethod=HmacSHA256
Refund request includes the
TransactionId, which identifies the transaction to be refunded. The request also includes a value you create for
RefundTransactionReference, which must be a unique value in your namespace.
Within the return, Amazon Flexible Payments Service returns
TransactionStatus, which specifies whether the request completed successfully or not. The parameter,
RefundTransactionReference, is also returned so that you can associate the information on your end with the refund status Amazon Payments returns. For more information about the
Refund action, its parameters, and return values, see Refund.