Checkgiftcardbalance
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/programs/{programId}/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/programs/{programId}/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/programs/{programId}/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
Checkgiftcardbalance
Authenticate the provided card number and security code, and return the card’s balance and usability information.
Performs a constant-time security-code comparison and abuse/lockout checks before returning card details.
Returns:
BalanceCheckResponse: Contains cardNumber, lastFourDigits, balance, status, expiresAt, and isActive.
On authentication failure or lockout the endpoint responds with an HTTP error (e.g., 404 for not found/invalid code, 429 for rate limiting or card lockout).
POST
/
v2
/
giftcards
/
programs
/
{programId}
/
balance-check
Checkgiftcardbalance
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/programs/{programId}/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/programs/{programId}/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/programs/{programId}/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.
Path Parameters
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Query Parameters
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 