curl https://secure.api.thanxsandbox.com/cards \
-X POST \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
-d '{
"card": {
"number": "1234123412341234"
}
}'
{
"card": {
"id": "92b7b0dac4",
"user_id": "weorufsdf",
"last4": "1234",
"type": "visa",
"zip_code": "12345"
}
}
Cards
Create Card
This endpoint registers a new card with Thanx.
POST
/
cards
curl https://secure.api.thanxsandbox.com/cards \
-X POST \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
-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
Response
curl https://secure.api.thanxsandbox.com/cards \
-X POST \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
-d '{
"card": {
"number": "1234123412341234"
}
}'
{
"card": {
"id": "92b7b0dac4",
"user_id": "weorufsdf",
"last4": "1234",
"type": "visa",
"zip_code": "12345"
}
}