Read Card Details

Use Affirm's Read Card API to get virtual card details on the server-side.

How it works

In order to block credit card details to be shared on the client-side callback, you will need to contact Affirm to configure your account appropriately.

This action will return the Affirm virtual card details associated with the checkout_token that was returned by your client-side integration. You need to request the card details via this endpoint.

Step 1: Retrieve the checkout_token on the Client-side

{
  callback_id: "5473686c-1dc4-4153-b9a7-abfccc00ef3a",
  checkout_token: "FA0UUFRGOND84S7C",
  created: "2020-01-24T20:00:50.712662",
  id: "FA0UUFRGOND84S7C"
}

Step 2: Retrieve the full card details via your server

{
    "billing_address": {
      "street1": "4519 Rue Levy",
      	"street2": "Apt 1",
      	"city": "Saint-Laurent",
     	 "region1_code": "QC",
      	"postal_code": "H4R2P9",
      	"country": "CAN"
 	  },
    "checkout_token": "FA0UUFRGOND84S7C",
    "created": "2020-01-24T20:00:50.712662",
    "cvv": "123",
    "number": "4111111111111111",
    "callback_id": "5473686c-1dc4-4153-b9a7-abfccc00ef3a",
    "cardholder_name": "AffirmInc John doe",
    "expiration": "0121",
    "charge_ari": "35PW-YI16"
}