Developer Console
アクセスいただきありがとうございます。こちらのページは現在英語のみのご用意となっております。順次日本語化を進めてまいりますので、ご理解のほどよろしくお願いいたします。

Refund Charge

The Payment service API provides the Company a single point of integration with Amazon to facilitate payment processor integration. The payment service allows the Company to complete one integration while getting access to multiple payment processors.

Note: In the future, new attributes might be added. We recommend that you structure your code so that it can handle new attributes gracefully

Refund

POST /v1/refund

Refund charge for the shopping trip. An empty 200 (OK) response indicates Refund has been successfuly initiated.

Note: Refunds via the payment API are only available for 7 days from the date of the shopping trip.

Body parameter

{
  "storeId": "string",
  "shoppingTripId": "string",
  "amount": {
    "amount": 0,
    "code": "str"
  },
  "refundRequestId": "string",
  "refundReasonCode": "DAMAGED_ITEM"
}
Data Field Required Description
storeId Required string <= 255 characters ^[0-9a-zA-Z_-]*$. The storeId field contains the store identifier designated during your onboarding process. If you have multiple stores, each store will have a unique identifier. You use this field to identify in which one of your store locations a shopper is requesting access
shoppingTripId Required string <= 255 characters ^[0-9a-zA-Z_-]+$. The ShoppingTripId field contains a Universally Unique ID (UUID) for the current shopping trip. Amazon generates a UUID for each shopping trip.
amount Required The authEvent object stores a UUID in the id field to keep track of each interaction, a timestamp of when the interaction occurred, and a location that tracks whether the interaction was at the ENTRY or EXIT gate
Data Field Required Description
amount Required number. The amount field contains the calculated price for the cart that will be charged to the shopper payment mechanism.
code Required string <= 3 characters ^[A-Z]{3}$. CurrencyCode field contains an enumerated string representing the type of currency you are collecting. For example, if you’re collecting U.S. dollars, you would enter USD into this field.
refundRequestId Required string <= 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$. RefundRequestId: Idempotency key that helps to ensure that duplicate requests do not result in duplicate refunds. Should be unique uuid for all refunds
refundReasonCode Required string (RefundReasonCode). Enum: "DAMAGED_ITEM", "EXPIRED_ITEM", "UNWANTED_ITEM", "JWO_TECH_ERROR", "OTHER". Reason for the Refund

Success example responses

> 200 Response
{
  "reconciliationId": "string"
}
Data Field Required Description
reconciliationId Required string <= 64 characters ^[0-9a-zA-Z]*$ , identifier used to reconcile a transaction with payment processor.

Failure example responses

{
  "errorMsg": "string"
}
Status Meaning Description
400 UnknownShoppingTrip You will receive a 400 UnknownShoppingTrip if you attempt to checkout using an invalid shoppingTrip
400 BadRequestException The API returns a 400 Bad Request Error when requests to the payment service might be missing a required value or an incorrect data type is passed to the API. For example an incorrect storeId or shoppingTripId
429 Too Many Requests Too Many Requests – The client has sent too many requests in a given amount of time (rate limiting. A Retry-After header will be included in the response indicating how long to wait before making a new request. Retry-After: 600 (5 minutes) is the current setting
500 ServiceException A 500 ServerError is received when the payment servie call fails due to a server issue. For example an un-handled exception or error occurs when processing the API call. You are encouraged to retry the API call to Amazon using an exponential backoff algorithm

503 ServiceUnavailableException, example responses

{
  "errorMsg": "string",
  "retryAfter": "string"
}
Data Field Required Description
errorMsg Required string. A 503 ServiceUnavailable is returned when the payment serivce is unavailable. If you receive a 503, you should re-try the API call after the indicated time in the API response.
retryAfter Required string. The the time to wait for retry in seconds.