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 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
checkout_token
on the Client-side{
callback_id: "ea23091b-5be2-4fa7-8c61-c82e44ff9d7a",
checkout_token: "98N4RD9PNPXC863O",
created: "2020-01-27T21:50:24.609337",
id: "98N4RD9PNPXC863O"
}
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": "98N4RD9PNPXC863O",
"created": "2020-01-27T21:50:24.609337",
"cvv": "123",
"number": "4111111111111111",
"callback_id": "ea23091b-5be2-4fa7-8c61-c82e44ff9d7a",
"cardholder_name": "AffirmInc Alexandru Sabou",
"expiration": "0121"
}
Updated 20 days ago