The external_ref field
This is your own system’s user ID. Set it when you create the customer so you can look them up by your ID, not ours.
GET /v1/customers?external_ref=usr_8847.
Without external_ref, you’d have to store our id (cus_01JXYZ...) in your database separately. Setting it means you never need to.
The customer balance
Customers have a ledger balance in kobo. It starts at zero. The balance increases when:- A customer overpays an invoice (e.g., transfers ₦6,000 on a ₦5,000 invoice)
- You issue a manual credit
- A downgrade proration results in a credit
- It offsets the next invoice (applied automatically before charging the card or waiting for transfer)
Create a customer
Response
Retrieve by external ref
external_ref values, it returns exactly one customer.
Check entitlements
Before serving any feature, check if the customer has access. Don’t parse subscription state yourself.Response
has_access: false means cut them off. tier tells you what features to show (if you have feature gating by plan). subscription_state tells you why — past_due means their card is failing, delinquent means grace expired.
A customer without a subscription still exists. You might create them at sign-up and subscribe them later — after a trial sign-up flow, for example.