Sell credit
Sell a credit pack (a one-time price on a product created withkind: credit) or a custom amount:
billingReason: credit_purchase). Its credit waits as pending_payment, shown in pending on the balance, until the invoice is paid; then it becomes spendable and its expiry starts.
- With manual collection (the default), send the customer to the invoice’s
hostedUrlto pay. - With
"collectionMode": "automatic", Bouclay chargespaymentMethod, or the customer’s default card. - Voiding an unpaid top-up cancels its credit.
Bonus packs
“Pay ₦50,000, get ₦55,000”: setcreditAmount above unitAmount on the pack’s price. The extra ₦5,000 is its own promotional lot, spent first. Refunding or charging back the top-up forfeits what is left of the bonus.
When VAT is charged
The customer pays VAT once on what their credit pays for. You choose when, withvatTiming on the purchase, the pack’s product, or your default under Billing settings → Tax → Prepaid credit. Which one fits is a question for your accountant.
Credit taxed when bought only pays lines taxed the same way as its top-up. An exempt, zero-rated or export line, or one after a VAT rate change, is billed normally.
Refunds
Refunding a top-up is capped at the credit not yet spent (forat_purchase credit, that credit plus its VAT). A credit note on a usage invoice that prepaid credit paid gives that part back to the lots it came from.
Stop when credit runs out
ReadprojectedAvailable on the credit balance before costly work, and stop at zero. For an exact stop, with no overspend when two requests arrive at once, use credit holds.
Auto-reload
Keep a customer topped up: “when my credit falls to ₦5,000, buy ₦20,000 with my card”.- One rule per customer and currency. Posting again replaces it.
- After every change to the customer’s credit and every usage event, Bouclay compares
projectedAvailablewiththreshold. At or below it, it buysamountof prepaid credit, charged topaymentMethodor the default card. - One fall buys once. It buys again only after the credit has been back above the threshold.
PATCH /customers/{id}/credit-auto-reloads/{currency}changes it;"enabled": falseturns it off.
disabledReason: payment_failed), and the customer gets an email saying automatic top-ups are off. Nothing is retried. Turn it back on once the card is sorted. A rule also turns itself off when there is no card left to charge (no_payment_method). Each change sends credit_auto_reload.updated.