Use this API to retrieve the card token

This interface is called by the merchant backend to retrieve the token stored in the Afterpay backend

The interface provided is an HTTP GET request and JSON response.

HTTP Request

GET https://<env>/v1/cards/verification?originalRequestId={originalRequestId}

Request headers

ParameterMandatoryDescription
Content-Typeyesapplication/json
Acceptyesapplication/json
AuthorizationyesBearer Access-admin-oauth-token (Refer Authentication)
User-AgentyesAll requests must include information about the Merchant, Platform, Channel and Service. For example Merchant/SED; Platform/Merchant-SP; MerchantId/ABC123; Channel/app; CountryCode/AU; System Information/Java/8.3; Service/Unlock
Request-IdyesUnique identifier for retrieve token details request provided by the merchant

Query parameters

NameTypeMandatoryDescriptionComment
originalRequestIdstringyesRequest-Id of the original card verification request completed earlier (request ID provided in the original transaction.)

Sample Example

curl -v -X GET https://<env>/v1/cards/verification?originalRequestId={originalRequestId} \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <Access-Token>" \
-H "User-Agent: Merchant/ABC; Platform/Merchant-FE; MerchantId/ABC123; Channel/autopayment; CountryCode/AU System Information/Java/8.3; Service/Auto-recharge"\
-H "Request-Id: 8456732415666565656565656565657" \

Response body

NameTypeMandatoryDescriptionComment
idstringyesUniquely identifies each transaction. This is generated by Afterpay and is included in the response to each interaction
receiptIdstringyesThe unique identifier representing the tokenisation
tokenstringyesThe unique identifier for the customer's stored payment card that can be used for payment; card token
last4DigitsstringyesThe last 4 digits of the payment card may be used for visual identification of the payment card
creditLimitnumberno
cardBrandstringnoThe scheme issuing the card e.g. Visa, Mastercard, American Express
cardTypestringnoIndicates the payment card type and whether it is associated with a credit or debit account
cardSubTypestringnoIndicates the non-standardised, marketing sub-classification of the card
issuingBankstringnoThe name of the institution issuing the payment card
countrystringnoThe country in which the card was issued

Sample Example

Status: 200 OK
{
  "id": "13e753e2e4a4b2f692b573e5fbe98b7b5523586a",
  "receiptId": "32432", 
  "token": "6966af4975984c30ae2e2c18985bc21c",
  "last4Digits": "1111",
  "creditLimit": 123,
  "cardBrand": "VISA",
  "cardType": "DEBIT",
  "cardSubType": "pre-paid giftcard",
  "issuingBank": "Commonwealth Bank of Australia",
  "country":"AU"
}
Language
Click Try It! to start a request and see the response here!