A rewards API is a set of web endpoints that lets your software give someone a reward without anyone placing an order by hand. Your server asks what rewards exist, buys one, and gets back something the user can spend. With a gift card rewards API, that is a code for a brand’s gift card: a card number, a PIN, or both, with an expiry date.
The point is that a reward can follow an event in your product. A cardholder crosses a spend target, a user refers a friend, an employee reaches a work anniversary: your system calls the API and the card is issued in the same moment.
What a rewards API does
A gift card rewards API does five jobs. Each is an endpoint or a notification.
| Job | What you call or receive | What you get |
|---|---|---|
| Catalogue | A list of brands | Each brand’s amounts, limits, status, terms and how to redeem |
| Order | An order with your own reference number | One order, paid from your balance |
| Issue | The order’s response, or a status check | The card number, PIN and expiry for each card |
| Status | Webhooks | Notice when an order finishes, a brand changes or your balance runs low |
| Balance | A balance check | What is left in your wallet, and on a card you issued |
Behind those calls, the provider holds the agreements with each brand, gets the codes and settles the money with the brands. That is the work you are buying.
How one reward moves through it
Here is one order, step by step, as it works on Hubble’s gift card API. Other gift card APIs follow a similar shape under their own names.
- Your server signs in with its client ID and secret and gets a token. It reuses the token until it expires.
- It reads the catalogue and keeps a copy, refreshed every day. Each brand says which amounts it allows: a fixed list, or any amount within a range.
- Your rules decide a user has earned a ₹500 card. Your server places an order with the brand, the amount and a reference number it has never used before.
- The API checks the amount against the brand’s limits and debits your prepaid wallet.
- The response has one of three outcomes. SUCCESS carries the cards. FAILED carries a reason, and the debit is reversed on its own. PROCESSING means the card is taking longer to issue.
- For a processing order, a webhook tells you when it finishes, and your server then fetches the cards. Without a webhook, you check the order a few times.
- Your app shows the user the card number, PIN, expiry and how to redeem it.
Two details in that flow save the most trouble later. The reference number makes the order safe to retry: if your request times out, you look the order up by its reference before trying again, so a card is never bought twice. And the statuses tell you exactly what to show the user, so no one is told a reward is on its way when it failed.
What your side still builds
A rewards API delivers the reward. It does not decide who gets one.
- The rules. Who is eligible, how much they earn, caps per user and the total budget stay in your system.
- The screens. Where the user picks a brand, sees the code and reads the terms.
- Safe storage. A gift card code is money. Keep codes out of logs and show them only to the person they belong to.
- Reconciliation. Match your record of rewards given against the provider’s orders and your wallet statement.
How these parts fit together, and where each tends to break, is in how a rewards system fits together.
Where teams use one
- Card and payment rewards. A bank or fintech turns spend milestones or points into gift cards. See loyalty programmes for banks and fintechs.
- A gift card store in your app. Users buy gift cards inside your app and pay through your checkout. See the options for apps and banks.
- Employee rewards. An HR system sends a card on a birthday or anniversary without a new order each time. See employee rewards.
- Referral and goodwill rewards. A referral bonus or a service apology goes out as a card the moment it is approved.
API, SDK or portal
An API gives you the most control and needs engineers to build the screens. If you want a store inside your app without building it, an SDK does that. If your users only need to redeem points, a hosted portal needs no integration. The trade-offs are set out in API, SDK or portal.
If you are weighing more than one gift card API, how to compare gift card APIs in India gives you a sheet to fill in and a one-day test.
Hubble’s gift card API
Hubble’s gift card API covers the catalogue, ordering, issuance and balance for 500+ brands, in four calls: list brands, place an order, receive the code, and track it by webhook. You sign up on the integration portal for staging keys, and Hubble issues production keys once your staging integration is verified. Most teams go from sign-up to a live order within a day.
Start with the API docs, or see everything for builders on the developers page.