Card Verification & Tokenisation

Use this API to verify customer card details and store the card token

This interface is called by the client application to submit credit card details directly to the Afterpay Mobility Host, removing the need for merchants to store or transmit credit card information. This endpoint is public and could be accessed by the client.

Submit the card details and receive verified card details and the payment token which could be used for payments later

The interface provided is an HTTP POST Request and JSON response.

HTTP Request

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

Request body

NameTypeMandatoryDescriptionComment
cardHolderNamestringyesThe name as printed on the card.
panstringyesThe primary account number (PAN) or card number of the payment card.14 to 16 digits
expiryMonthinteger(2)yesThe 1 to 2 digit number indicating the month in which the payment card expires.1 to 12
expiryYearinteger(4)yesThe 2 to 4 digit number (prefix with 0) indicating the year in which the payment card expires.2 to 4 digits
cvcstringyesThe Card Verification Code (aka Card Verification Value (CVV) or Card Security Code (CSC)) is a security measure for card not present transactions to reduce fraud.3 digit for MC/Visa, 4 digit for Amex
riskRiskyesInformation to enable risk assessment process.Refer Risk Object
requestorstringyesWho requested the card verificationphone number, employee number etc.

Request headers

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

Sample Example

curl -v -X POST https://<env>/v1/cards/verification \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer c92b326fff28aba21821349c3ef411e"\
-H "User-Agent: Merchant/ABC; Platform/Digital; MerchantId/ABC123; Channel/sms; CountryCode/AU System Information/Java/8.3; Service/Shop"\
-H "Request-Id: 8456732415666565656565656565656" \
-d '{
  "cardHolderName": "John Smith",
  "pan": "42**************",
  "expiryMonth": 6,
  "expiryYear": 2020,
  "cvc": "123",
  "risk": {...},
  "requestor": "61402223333"
}'

Response body

NameTypeMandatoryDescriptionComment
idstringyesUniquely identifies each verification. This is generated by the APT and is included in the response
receiptIdstringyesidentifier for card verification and tokenisation
tokenstringnoThe unique identifier of the customer's payment card to be used for payments; referred to as payment token
last4DigitsstringnoThe last 4 digits of the payment card; could 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
countrystringyesThe country in which the card was issuedISO 3166-1 alpha-2

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"
}

Body Params
string
required

The name as printed on the card.

string
required

The primary account number (PAN) or card number of the payment card.

int32
required

The 1 to 2 digit number indicating the month in which the payment card expires.

int32
required

The 2 to 4 digit number (prefix with 0) indicating the year in which the payment card expires.

string
required

The Card Verification Code (aka Card Verification Value (CVV) or Card Security Code (CSC)) is a security measure for card not present transactions to reduce fraud.

string
required

Information to enable risk assessment process.

string
required

Who requested the card verification - example: customer ID, account-id

Headers
string
required

Bearer

string
required

All requests must include information about the Merchant and Platform. For example Merchant/ABC; Platform/Digital; MerchantId/ABC123; Channel/web; CountryCode/AU; System Information/Java/8.3; Service/Shop

string
required

Unique identifier for card verification request provided by the merchant

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json