Create Card (Deprecated)
curl https://api.thanxsandbox.com/cards \
-X POST \
$AUTH_HEADERS
-d '{
"card": {
"last4": "1234",
"type": "visa",
"encrypted_pan": "...",
"zip_code": "12345"
}
}'
{
"card": {
"id": "92b7b0dac4",
"user_id": "weorufsdf",
"last4": "1234",
"type": "visa",
"zip_code": "12345"
}
}
This endpoint has been deprecated.
This deprecated endpoint were used as part of a former mechanism of enrolling cards, which required client-side encryption of cards. Thanx now offers a much simpler API-only card enrollment endpoint which removes the need for card encryption SDKs. The new process should be used for all integrations going forward and all existing integrations must be updated by January 31st, 2024.
This endpoint will be disabled on January 31st, 2024.
Full credit card PANs should never be sent to this API endpoint.
Request Field
Last 4 digits of the card PAN
Card type (visa
, mastercard
, amex
)
Encrypted Card PAN (Must use Thanx Tokenization SDKs for this. No raw PANs should ever be sent to Thanx APIs)
The card’s billing zip code
Response
Card ID
The user the card belongs to
Last 4 digits of the card PAN
Card type (visa, mastercard, amex)
The card’s billing zip code
curl https://api.thanxsandbox.com/cards \
-X POST \
$AUTH_HEADERS
-d '{
"card": {
"last4": "1234",
"type": "visa",
"encrypted_pan": "...",
"zip_code": "12345"
}
}'
{
"card": {
"id": "92b7b0dac4",
"user_id": "weorufsdf",
"last4": "1234",
"type": "visa",
"zip_code": "12345"
}
}