POST
/
cards
Authorization
Body
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

last4
string
required

Last 4 digits of the card PAN

type
string
required

Card type (visa, mastercard, amex)

encrypted_pan
string
required

Encrypted Card PAN (Must use Thanx Tokenization SDKs for this. No raw PANs should ever be sent to Thanx APIs)

zip_code
string
required

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