Cards
Create Card v2 (Coming Soon)
This endpoint registers a new card with Thanx.
POST
/cards
Bearer*
Coming soon! (October 2024)
This card registration endpoint eliminates the need for leveraging any tokenization SDKs through an integration with a PCI certified card vaulting partner. Using this API endpoint drastically reduces the complexity of card registration.
Note that this API uses a different API URL than other Consumer API endpoints
- Sandbox:
https://secure.api.thanxsandbox.com/cards
- Production:
https://secure.api.thanx.com/cards
Request Field
numberrequired
string
The full card PAN
zip_coderequired
string
The card’s billing zip code
Response
id
string
Card ID
user_id
string
The user the card belongs to
last4
string
Last 4 digits of the card PAN
type
enum
Card type (visa, mastercard, amex)
zip_code
string
The card’s billing zip code
curl https://secure.api.thanxsandbox.com/cards \
-X POST \
$AUTH_HEADERS
-d '{
"card": {
"number": "1234123412341234",
"zip_code": "12345"
}
}'
{
"card": {
"id": "92b7b0dac4",
"user_id": "weorufsdf",
"last4": "1234",
"type": "visa",
"zip_code": "12345"
}
}
curl https://secure.api.thanxsandbox.com/cards \
-X POST \
$AUTH_HEADERS
-d '{
"card": {
"number": "1234123412341234",
"zip_code": "12345"
}
}'
{
"card": {
"id": "92b7b0dac4",
"user_id": "weorufsdf",
"last4": "1234",
"type": "visa",
"zip_code": "12345"
}
}