Burn API
After a promotion is validated and applied, its redemption flow isn’t complete until it’s burned.This final step confirms that the promotion was successfully used, ensuring it cannot be reused and that your analytics, limits, and reward logic remain accurate. Burning a promotion finalizes its lifecycle inside Gameball’s Promo Engine by marking it as used, ensuring transparent tracking and reliable customer data.
Overview
In Gameball’s Promo Engine, the Burn API serves as the final confirmation step that marks a promotion as redeemed after a successful order or payment. You should call this API once the transaction is successfully completed, such as when: If the transaction fails, gets canceled, or times out, use the Release API instead to free the locked promotion.Before You Burn: Validate First
Before any promotion can be finalized (burned), it must first be validated using theValidate API. This validation step is essential because it:
1
Confirms eligibility
Ensures the promotion is active and applicable to the customer, transaction, and cart context.
2
Generates a lock reference
Returns a unique
lockReference; this must be included in all burn or order redemption requests.When and Where to Use It
| Channel | Example Use |
|---|---|
| 🛍️ E-commerce | Finalize a 10% off promotion after successful checkout. |
| 🏪 POS (Retail) | Confirm an in-store promotion once the sale is processed. |
| 💳 Fintech / Payments | Apply and finalize promotional discounts on payments, bills, or services. |
Use Case 1: Burn Promotion After Checkout
Scenario
After Sarah completes her order using the WEEKEND10 promotion, the payment gateway confirms success. Your backend must now finalize the promotion redemption to ensure it cannot be reused.How to Implement
Once the payment is confirmed, call the Burn API with:customerId: the customer’s unique identifier- code(s): the applied promotion code(s), this is shared as a path parameter
lockReference: the lock reference from the validation step
Example Request
Example Response
Use Case 2: Apply & Burn a Promotion via the Order API
Scenario
For a smoother checkout, you can finalize promotions automatically when creating an order. Prerequisite: the promotion must first be validated using the Validate Promotion API to obtain thecouponsLockReference
Flow
1
Validate the promotion
Call the Validate API with the promotion code and customer data. The response includes a lockReference that temporarily locks this promotion for checkout.
2
Submit the order (auto-burn)
Send the Order API request, including the
couponsLockReference. Once the order succeeds, Gameball automatically burns the promotion.3
If payment fails or order is canceled
Use the Release API to unlock the promotion for reuse. Or wait until the configured lock duration expires.