Use this API to get the card details of a stored card token

Get the card details for the card token stored in the Afterpay backend.

This interface could only be accessed by the Merchant host. All other access will be blocked. IP whitelisting will ensure only traffic from Merchant could access this endpoint.

The interface provided is an HTTP Get Request and JSON response

HTTP Request

POST https://<env>/v1/cards/details

Request body

NameTypeMandatoryDescriptionComment
tokenstringyesThe unique identifier for the customer's payment card stored in Afterpay side referred to as card token
riskRiskyesInformation to enable risk assessment process.Refer Risk Object
requestorstringyesWho requested the card detailsphone number, employee number etc.

Request headers

ParameterMandatoryDescription
Content-Typeyesapplication/json
Acceptyesapplication/json
AuthorizationyesBearer Access-admin-oauth-token (Refer Authentication)
User-AgentyesAll requests must include information about the Afterpay Merchant, Platform, Channel and Service. For example `Merchant/ABC; Platform/Digital; MerchantId/ABC123; Channel/sms; CountryCode/AU; System Information/Java/8.3; Service/Activation
Request-Idyesunique identifier for card details request provided by the merchant

Sample Example

curl -v -X POST https://<env>/v1/cards/details \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer eryJghjhkhkhkjhjkhWErtyuuj" \
-H "User-Agent: Merchant/ABC; Platform/Digital; MerchantId/ABC123; Channel/sms; CountryCode/AU System Information/Java/8.3; Service/Recharge"\
-H "Request-Id: 8456732415666565656565656565656" \
-d '{
  "token": "6966af4975984c30ae2e2c18985bc21c"
  "risk": {...},
  "requestor": "61402223333"
}'

Response body

NameTypeMandatoryDescriptionComment
idstringyesUniquely identifies each transaction. This is generated by the APT and is included in the response
receiptIdstringyesIdentifier for card details request generated by Afterpay
last4DigitsstringnoThe last 4 digits of the payment card may be used for visual identification of the payment cardIt could be the last 4, 3 or 2 digits depending on what is stored in the Afterpay system due to PCI compliance – eg.,'1254', '324', '65'
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 issuedISO 3166-1 alpha-2
requestorstringnoWho requested the card detailsphone number, employee number etc.

Sample Example

Status: 200 OK
{
  "id": "13e753e2e4a4b2f692b573e5fbe98b7b5523586a",
  "receiptId": "32432",
  "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!