curl https://api.thanxsandbox.com/gift_cards \
-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_cards": [
{
"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"
},
{
"id": "xyz789ghi012",
"provider_id": "prov123merchant",
"card_number": "9876543210987654",
"pin": null,
"last4": "7654",
"balance": 25.50,
"state": "active",
"expires_at": null,
"created_at": "2024-11-20T14:30:00Z"
}
],
"pagination": {
"per_page": 10,
"total_pages": 1,
"current_page": 1
}
}
Gift Cards
Get Gift Cards
This endpoint returns a paginated list of a user’s active gift cards.
GET
/
gift_cards
curl https://api.thanxsandbox.com/gift_cards \
-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_cards": [
{
"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"
},
{
"id": "xyz789ghi012",
"provider_id": "prov123merchant",
"card_number": "9876543210987654",
"pin": null,
"last4": "7654",
"balance": 25.50,
"state": "active",
"expires_at": null,
"created_at": "2024-11-20T14:30:00Z"
}
],
"pagination": {
"per_page": 10,
"total_pages": 1,
"current_page": 1
}
}
Please review proper request headers here.
Parameters
integer
The current page of paginated resources.
- Default:
1.
integer
Number of records to be returned per API request.
- Default:
10 - Minimum:
1 - Maximum:
100
Response
string
Gift card ID
string
Provider merchant ID
string
Full gift card number
string
PIN code (if required by provider)
string
Last 4 digits of the card number
number
Current balance on the gift card (fetched in real-time from provider)
enum
Gift card state (
active, archived)string
Expiration date in ISO8601 format (nullable)
string
Time the gift card was added in ISO8601 format
hash
curl https://api.thanxsandbox.com/gift_cards \
-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_cards": [
{
"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"
},
{
"id": "xyz789ghi012",
"provider_id": "prov123merchant",
"card_number": "9876543210987654",
"pin": null,
"last4": "7654",
"balance": 25.50,
"state": "active",
"expires_at": null,
"created_at": "2024-11-20T14:30:00Z"
}
],
"pagination": {
"per_page": 10,
"total_pages": 1,
"current_page": 1
}
}