API ReferenceEndpointsPublic API (v1)Check a gift card balance (Public API)

Check a gift card balance (Public API)

Returns the spendable balance for a gift card code. POST on purpose, so the code stays out of URLs and logs. An unknown code, a disabled or expired card and an empty card all return the same { balance: "0.00", usable: false }, after the same minimum delay.

POST
/v1/gift-cards/balance
AuthorizationBearer <token>

Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.

In: header

codestring

The gift card code as the shopper typed it. Case, spaces and dashes are all tolerated, and characters excluded from the code alphabet (I, L, O, U) are corrected to the ones they are mistaken for.

Length4 <= length <= 64
curl -X POST "https://api.brainerce.com/api/v1/gift-cards/balance" \  -H "Content-Type: application/json" \  -d '{    "code": "A1B2-C3D4-E5F6-G7H8-J9K0"  }'
{
  "balance": "100.00",
  "currency": "ILS",
  "usable": true
}

{
  "statusCode": 400,
  "code": "VALIDATION_FAILED",
  "message": "name should not be empty, price must be a positive number",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/gift-cards/balance"
}

{
  "statusCode": 401,
  "code": "UNAUTHORIZED",
  "message": "Invalid or expired credential",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/products/bulk/{jobId}"
}

{
  "statusCode": 403,
  "code": "INSUFFICIENT_SCOPE",
  "message": "API key does not have the required scope: products:write",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/gift-cards/balance"
}

{
  "statusCode": 429,
  "code": "RATE_LIMITED",
  "message": "Too many requests",
  "details": {
    "retryAfterSeconds": 12
  },
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/gift-cards/balance"
}