Developers / Docs / Vouchers & coupons
Vouchers & coupons
Unique coupon and voucher codes, redeemed in your own billing software.
Illustrative. The Partner API is a proposal. Names, fields and numbers on this page show the intended shape; the final contract will be published as an OpenAPI file with the sandbox.
- 1 · Create the campaignValue or % off, minimum bill, dates, outlets, usage limit.
- 2 · Generate codesUnique, random codes: a few hundred or a million, in bulk or on demand.
- 3 · DistributeIn the Caship app, for points, by WhatsApp or SMS campaign, or your own channels.
- 4 · Validate at the counterYour billing software checks the code and holds it for 90 seconds.
- 5 · RedeemOne use only. Sending it twice returns the same answer, never a second discount.
- 6 · ReconcilePer-outlet report and events, with expired codes released.
Life of a code
- ISSUED
- HELD 90 s
- REDEEMED
- VOID
- EXPIRED
A validated code is held for 90 seconds so two counters cannot use it at once. If it is not redeemed in that time it goes back to ISSUED.
Calls and events
| Call | Purpose | Scope |
|---|---|---|
| POST /v1/campaigns | Create a campaign | vouchers.manage |
| POST /v1/campaigns/{id}/codes | Generate codes | vouchers.manage |
| POST /v1/vouchers/validate | Check and hold a code | vouchers.redeem |
| POST /v1/vouchers/redeem | Redeem a code | vouchers.redeem |
| POST /v1/vouchers/{code}/void | Void a code | vouchers.manage |
Events: voucher.issued, voucher.redeemed, voucher.expired.
Example
A restaurant chain with 300 outlets runs a winter campaign. Every outlet's billing software redeems the same codes, and the brand sees one per-outlet report.
Brands as gift-card suppliers
A brand can also supply codes to the Caship voucher store, where customers buy them with Caship Points.
