POST
/
cards
curl https://secure.api.thanxsandbox.com/cards \
  -X POST \
  $AUTH_HEADERS
  -d '{
    "card": {
      "number": "1234123412341234"
    }
  }'
{
  "card": {
    "id": "92b7b0dac4",
    "user_id": "weorufsdf",
    "last4": "1234",
    "type": "visa",
    "zip_code": "12345"
  }
}
This card registration endpoint allows for direct enrollment of cards with the Thanx platform for loyalty tracking via the credit card networks (Visa, Mastercard, American Express). This API endpoint is hosted by our secure card vaulting partner, which allows us to proxy cards for vaulting directly with the downstream credit card networks. 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
Please review proper request headers here.

Request Field

number
string
required
The full card PAN
zip_code
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"
    }
  }'
{
  "card": {
    "id": "92b7b0dac4",
    "user_id": "weorufsdf",
    "last4": "1234",
    "type": "visa",
    "zip_code": "12345"
  }
}