Customercheckgiftcardbalance
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/customer/balance-check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cardNumber": "<string>",
"securityCode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cardNumber: '<string>', securityCode: '<string>'})
};
fetch('https://api.loyalty.dog/v2/giftcards/customer/balance-check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/giftcards/customer/balance-check"
payload = {
"cardNumber": "<string>",
"securityCode": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "5eb7cf5a86d9755df3a6c593",
"programId": "5eb7cf5a86d9755df3a6c593",
"cardNumber": "<string>",
"lastFourDigits": "<string>",
"balance": "<string>",
"status": "pending",
"expiresAt": "2023-11-07T05:31:56Z",
"isActive": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Gift Cards
Customercheckgiftcardbalance
Customer Balance Check (Cross-Program)
Allows customers to check the balance of any gift card without needing to know the programId. Searches across all programs by card number and security code.
This endpoint is designed for customer-facing applications where the customer may have cards from multiple merchants/programs.
Security:
- Rate limited: 5 requests per minute per IP
- Pattern detection for enumeration attacks
- Card lockout after multiple failed attempts
- Constant-time security code comparison
Request Body:
cardNumber: The full 16-digit card numbersecurityCode: The 6-digit security code
Returns:
- Card balance, status, expiration, and activity status
Status Codes:
- 200: Balance retrieved successfully
- 404: Card not found or invalid security code
- 429: Rate limited or card locked
POST
/
v2
/
giftcards
/
customer
/
balance-check
Customercheckgiftcardbalance
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/customer/balance-check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cardNumber": "<string>",
"securityCode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cardNumber: '<string>', securityCode: '<string>'})
};
fetch('https://api.loyalty.dog/v2/giftcards/customer/balance-check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/giftcards/customer/balance-check"
payload = {
"cardNumber": "<string>",
"securityCode": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "5eb7cf5a86d9755df3a6c593",
"programId": "5eb7cf5a86d9755df3a6c593",
"cardNumber": "<string>",
"lastFourDigits": "<string>",
"balance": "<string>",
"status": "pending",
"expiresAt": "2023-11-07T05:31:56Z",
"isActive": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Body
application/json
Response
Successful Response
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Gift card status enumeration.
Available options:
pending, active, suspended, expired, voided, depleted 