Credit & debit points
Overview
Every credit or debit in the Loyalty API goes through a two-phase lifecycle:
- Create — the transaction is recorded with status
pending. The member’s balance is not yet updated. - Complete or Cancel — you explicitly confirm or void the operation.
This pattern mirrors real-world eCommerce flows: credit points only when a purchase is confirmed, not when it is merely placed — and cancel the credit if the order is cancelled or returned.
Create a transaction
Endpoint: POST https://api.brevo.com/v3/loyalty/balance/programs/{pid}/transactions
Use this for non-purchase events: sign-up bonuses, birthday credits, manual adjustments, referral rewards.
Request parameters
Response (200)
Always persist the id returned by Create transaction. You need it to call /complete or /cancel. If you lose it, you will need to query the transaction list to retrieve it.
Complete a transaction
Endpoint: POST https://api.brevo.com/v3/loyalty/balance/programs/{pid}/transactions/{tid}/complete
Completing a transaction finalizes the credit or debit: the member’s balance is updated, tiers are re-evaluated, and reward rules are checked.
Path parameters
Response (200)
What happens after completion:
- Member’s balance is updated (e.g. 0 → 50 pts)
- If tier trigger is
real_time: tier thresholds are evaluated and the member may be upgraded - Webhook
balance_value_updatedis fired - If a tier threshold is crossed: webhook
tier_association_updatedis fired - If a reward rule matches: a voucher is attributed
When to call Complete:
Cancel a transaction
Endpoint: POST https://api.brevo.com/v3/loyalty/balance/programs/{pid}/transactions/{tid}/cancel
Cancelling a transaction voids it entirely. The member’s balance is not affected.
Response (200)
When to call Cancel:
Handling returns after delivery (balance already completed):
A completed transaction cannot be cancelled. Instead, create a new transaction with a negative amount (debit) and complete it.
Create a balance order
Endpoint: POST https://api.brevo.com/v3/loyalty/balance/programs/{pid}/create-order
A balance order is the right tool for crediting points on a purchase. It creates a single tracked event tied to a business order, which you later complete or cancel as one unit.
Request parameters
Response (200)
The order returns a transactionid. Use this to call /complete or /cancel when the purchase status is resolved.
Transaction vs. balance order: A direct transaction is for a single credit or debit event on a single balance. A balance order is intended for purchase flows where you want to track the originating business event (the order) independently from the balance operation.