Givagift gift card API
Balance checks, full or partial redemption, and new-money credits for booking systems and tills.
Access and authentication
Create a key in Dashboard → API integrations. Each key belongs to one venue, expires after one year, and can be revoked immediately. Balance access is included; redemption and credits are separate permissions.
Send the key in the Authorization header from your server over HTTPS. Never put a key in browser JavaScript, a URL or a public embed. Cross-origin browser calls are not supported. Responses are never cached and do not include buyer or recipient details.
Authorization: Bearer $GIVAGIFT_API_KEY
Amounts and retries
All amounts are positive integers in the venue currency’s minor units: 1250 means £12.50 for GBP. Redemption and credit requests must include the matching currency (GBP, EUR, USD, CAD, AUD or NZD).
Include a unique Idempotency-Key for every redemption or credit. Retry with the same key and identical request after a timeout: the saved result is returned, not another charge or credit. A key reused with different details returns 409. Saved declines are also replayed; a genuinely new attempt needs a new key. Keys are scoped to the integration key: do not switch API keys during retries.
The limit is 120 requests per minute per API key. A 429 response includes Retry-After: 60. Request bodies are limited to 4 KB. Idempotency keys allow 1–100 letters, numbers, dots, underscores, colons or hyphens; references allow up to 100 characters.
Check a balance
POST https://giva.gift/api/public/v1/vouchers/balance
Returns the current balance and validity, including exhausted, expired or void cards. Check redeemable before offering payment, but rely on the redemption result: a balance check does not reserve funds. Codes are case-insensitive.
curl -X POST 'https://giva.gift/api/public/v1/vouchers/balance' \
-H "Authorization: Bearer $GIVAGIFT_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"code":"GFT-2345-67"}'Successful response
{
"ok": true,
"balance": 5000,
"initial_amount": 5000,
"currency": "GBP",
"status": "active",
"expires_at": null,
"activates_at": "2026-11-26T00:00:00Z",
"redeemable": true
}Redeem / charge a gift card
POST https://giva.gift/api/public/v1/vouchers/redemptions
Deducts the amount atomically. Unpaid, void, expired and not-yet-active vouchers are rejected, as are amounts above the available balance. Entries appear in the venue’s redemption reports under the integration name. A redemption does not charge a bank card.
curl -X POST 'https://giva.gift/api/public/v1/vouchers/redemptions' \
-H "Authorization: Bearer $GIVAGIFT_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: booking-1042-redeem' \
-d '{"code":"GFT-2345-67","amount":1250,"currency":"GBP","reference":"booking-1042"}'Successful response
{
"ok": true,
"balance": 3750,
"currency": "GBP",
"redemption_id": "UUID returned by Givagift"
}Credit / add new money
POST https://giva.gift/api/public/v1/vouchers/credits
Requires credit permission and a non-empty reference to money already collected in your own system. This endpoint adds spendable value; it does not collect payment, confirm a Stripe payment, refund a redemption or charge Givagift’s checkout fee. Your system must authorise and settle the payment before crediting.
Credits leave the original voucher value, original purchase and expiry unchanged. A fully spent valid card becomes active again; pending, void, expired and not-yet-active cards cannot be credited. Credits are recorded separately in Reports → Credits and included in outstanding liability and applicable tax estimates. These are new-money credits, not a redemption reversal or a bank refund.
curl -X POST 'https://giva.gift/api/public/v1/vouchers/credits' \
-H "Authorization: Bearer $GIVAGIFT_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: external-payment-2081-credit' \
-d '{"code":"GFT-2345-67","amount":2000,"currency":"GBP","reference":"external-payment-2081"}'Successful response
{
"ok": true,
"balance": 5750,
"currency": "GBP",
"credit_id": "UUID returned by Givagift"
}Errors
| HTTP | Error | Meaning |
|---|---|---|
| 400 | bad_request / bad_amount | Invalid JSON, fields, amount, currency or reference. |
| 400 | idempotency_key_required | Missing or invalid Idempotency-Key. |
| 400 | currency_mismatch | Currency does not match the venue. |
| 401 | unauthorized | Invalid, expired or revoked key, or inactive venue. |
| 403 | forbidden | Key lacks the requested permission. |
| 404 | not_found | Code is not a voucher belonging to this venue. |
| 409 | void / expired / not_active | Voucher cannot be used. |
| 409 | insufficient | Not enough balance; response includes balance. |
| 409 | idempotency_conflict | Idempotency key was already used with different details. |
| 429 | rate_limited | Wait before retrying. |
| 503 | service_unavailable | Retry using the same idempotency key; do not assume success or failure. |
{"ok":false,"error":"insufficient","balance":500}