Developer Console
Merci de votre visite. Cette page est disponible en anglais uniquement.

Get Transactional Data

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

GetTransactionalData

POST /v1/payment/transactional-data Get EMV transaction data for receipt generation

Body parameter

{
  "storeId": "string",
  "shoppingTripId": "string"
}
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.

Success example responses

> 200 Response
{
  "brand": "string",
  "posEntryMode": "EMV_9F39_02",
  "currency": "str",
  "authorizationResponseCode": "string",
  "cryptogramInformationData": "st",
  "tail": "stri",
  "panSequenceNumber": "string",
  "applicationId": "string",
  "expirationDate": {
    "expirationYear": "string",
    "expirationMonth": "string"
  },
  "cardholderVerificationMethodResult": "string",
  "terminalId": "string",
  "reconciliationId": "string",
  "cardStatementTransactionId": "string"
}
Data Field Description
brand string. Example AMEX,VISA
posEntryMode string
  • Enum: "EMV_9F39_02", "EMV_9F39_05", "EMV_9F39_07", "EMV_9F39_80", "EMV_9F39_90"
  • EMV Tag 9F39: Indicates the method by which the PAN was entered, according to the first two digits of the ISO 8583:1987 POS Entry Mode.(www.iso.org/standard/15870.html)
  • Required for successful processing of EMV transactions and fallback.Format: enum
  • EMV_9F39_02: Magnetic stripe read, but full, unaltered contents not provided. This is only to be used when the terminal is not CVV/CVC compliant.
  • EMV_9F39_05: Chip card read via chip reader, track data reliable
  • EMV_9F39_07: Card information read by a contactless reader
  • EMV_9F39_80: Chip card, fall back to magnetic stripe read(MC/International Maestro only)
  • EMV_9F39_90: Magnetic stripe read and full, unaltered contents provided
currency 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.
authorizationResponseCode string
cryptogramInformationData string <= 2 characters ^[0-9A-F]*$. EMV Tag 9F27: Indicates the type of cryptogram and the actions to be performed by the terminal.
tail string <= 4 characters. Last 4 digits of Credit Card.
panSequenceNumber string <= 99 characters. EMV Tag 5F34: Identifies and differentiates cards with the same PAN. Required for successful processing of EMV transactions.
applicationId string <= 32 characters ^[0-9A-F]*$.EMV Tag 4F: Identifies the application as described in ISO/IEC 7816-5.
expirationDate object (ExpirationDate).Credit Card Expiration Date.
Data Field Required Description
expirationYear Required number. The amount field contains the calculated price for the cart that will be charged to the shopper payment mechanism.
expirationMonth 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.
cardholderVerificationMethodResult string <= 6 characters ^[0-9A-F]*$. EMV Tag 9F34: Indicates the results of the last Cardholder Verification Method performed. This indicates that the payment method was not validated with an external factor such as a PIN in countries that normally require it. Failures can typicaly be ignored if payment has successfully been processed.
terminalId string
reconciliationId string <= 64 characters ^[0-9a-zA-Z]*$. Identifier used to reconcile a transaction with payment processor.
cardStatementTransactionId string <= 64 characters ^[0-9a-zA-Z]*$ .Identifier used by retailer to associate card statement transactions with shopping trips. This is frequently used to lookup shopping trips when their ShoppingTripId is not present.

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.