1. Cards
  2. Create Card
POST

/cards

Bearer*

Request Field

last4Required
string

Last 4 digits of the card PAN

typeRequired
string

Card type (visa, mastercard, amex)

encrypted_panRequired
string

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

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://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"
  }
}