curl https://api.thanxsandbox.com/gift_cards/abc123def456 \
-X GET \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
{
"gift_card": {
"id": "abc123def456",
"provider_id": "prov123merchant",
"card_number": "1234567890123456",
"pin": "1234",
"last4": "3456",
"balance": 50.00,
"state": "active",
"expires_at": "2026-12-31T23:59:59Z",
"created_at": "2024-12-15T10:00:00Z"
}
}
{
"error": {
"message": "Could not fetch balance"
}
}
Gift Cards
Get Gift Card
This endpoint returns a single gift card with its current balance.
GET
/
gift_cards
/
{id}
curl https://api.thanxsandbox.com/gift_cards/abc123def456 \
-X GET \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
{
"gift_card": {
"id": "abc123def456",
"provider_id": "prov123merchant",
"card_number": "1234567890123456",
"pin": "1234",
"last4": "3456",
"balance": 50.00,
"state": "active",
"expires_at": "2026-12-31T23:59:59Z",
"created_at": "2024-12-15T10:00:00Z"
}
}
{
"error": {
"message": "Could not fetch balance"
}
}
This endpoint retrieves details for a specific gift card, including the current balance fetched in real-time from the gift card provider.
Please review proper request headers here.
Parameters
Response
Current balance on the gift card (fetched in real-time from provider). May be null in list responses if provider is unavailable.
curl https://api.thanxsandbox.com/gift_cards/abc123def456 \
-X GET \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
{
"gift_card": {
"id": "abc123def456",
"provider_id": "prov123merchant",
"card_number": "1234567890123456",
"pin": "1234",
"last4": "3456",
"balance": 50.00,
"state": "active",
"expires_at": "2026-12-31T23:59:59Z",
"created_at": "2024-12-15T10:00:00Z"
}
}
{
"error": {
"message": "Could not fetch balance"
}
}