Read Card Details
Use Affirm's Read Card API to get credit card details on the server-side.
How it works
The Read Card endpoint returns the Affirm Virtual Card details associated with the checkout_token that was returned by your client-side integration.
Account ConfigurationTo block credit card details from being shared on the client-side callback, you must contact Affirm to configure your account appropriately.
Implementation steps
1. Retrieve the checkout_token on the client-side
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"
}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"
}Recommended Topics
Updated 3 days ago