Skip to content

Post Refund API

Method: POST

Path: https://amazonpay.amazon.in/v1/payments/refund

ContentType: application/json

Description: This API enables the refund of a transaction based on the value passed in the request.

Request Parameters

Parameter Name Data Type Description Mandatory Constraints
amount String Refund Amount Yes Minimum value = 0.01
Note: Refund amount should be less than or equal to the order amount
currencyCode String Currency of the order Yes Allowed Value: "INR"
refundId String Unique Refund Order ID generated by the merchant Yes Maximum 32 characters
Allowed values:
lowercase a-z
uppercase A-Z
numbers 0-9
dash (-)
underscore (_)
chargeIdType String Charge Type Yes Possible Values:
- AmazonTxnId
- MerchantTxnId
chargeId String Identifier corresponding to the type specified in chargeIdType field Yes
merchantId String Merchant ID provided by Amazon Yes
noteToCustomer String Message to be displayed to customer regarding refund No Max 200 characters
softDescriptor String Reason for the refund No Max 200 characters

Sample JSON for Request

{
  "merchantId": "A2UOYLUXLC6NR3",
  "refundId": "M04-3581290-6586191",
  "chargeIdType": "AmazonTxnId",
  "chargeId": "P04-0249917-0735882",
  "amount": "2.00",
  "currencyCode": "INR",
  "noteToCustomer": "string",
  "softDescriptor": "string"
}

Response Parameters

Parameter Type Description
refundId String Unique id generated for the refund request
amazonRefundId String Amazon-generated identifier for the refund transaction
amount String Amount requested to be refunded
refundedFee String The capture fee that has been refunded
currencyCode String Will always be INR
status String Transaction status (Approved, Pending, Declined)
createTime String Creation timestamp
updateTime String Last update timestamp

Sample Response

{
  "refundId": "ve7vdsd99sde7f",
  "amazonRefundId": "P04-0249917-0735882-R8908908",
  "amount": 0.01,
  "refundedFee": 0.01,
  "currencyCode": "INR",
  "status": "Approved/Pending/Declined",
  "createTime": "2020-01-18T11:11:41.511Z",
  "updateTime": "2020-01-18T11:12:52.661Z"
}

Common Errors

Error Resolution
Invalid refundId Please pass a valid refundId based on the constraints specified.
Transient error in API response If you encounter any transient error, please try the API call again after 30 minutes to one hour.