Read card details

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

How it works

🚧

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

This 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": "123 Affirm St",
        "street2": "Apt 123",
        "city": "San Francisco",
        "region1_code": "CA",
        "postal_code": "94108",
        "country_code": "USA"
    },
    "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"
}