Billers
Enrolling your customers
Register your customers so their bills reach them in their bank's and wallet's apps, with their consent.
A customer can find their bills on KulPay's channels in two ways: they add your account themselves in their app, or you enrol them. When you enrol a customer by phone, email, NUIT or KulPay @handle, KulPay matches them to the people on its channels; a match subscribes them (or offers your bills to them first, as their channel prefers), and from then on your invoices for that account reach them in their app.
Before you start
A key with payers:write, and your lawful basis for sharing the customer's bills (their consent, your contract with them, a legal obligation or a legitimate interest).
The flow at a glance
| # | Who | What happens |
|---|---|---|
| 1 | Your system | Enrols customers with their account reference and phone or email. |
| 2 | KulPay | Matches them to people on its channels and subscribes or offers them your bills. |
| 3 | Customers | See your invoices in their app, and can opt out at any time. |
1. Enrol customers
Your system.
POST /v1/biller/payers · API reference
Up to 1,000 at a time, each with its account_reference and at least one way to reach the customer: phone, email, nuit (9 digits) or handle (their KulPay @handle). Any one that matches a payer subscribes them. Each is answered with how many people it subscribed. A person who opted out of an account is never subscribed again by an enrolment.
Request
{
"lawful_basis": "contract",
"payers": [
{
"account_reference": "ALU-2031",
"phone": "841234567"
},
{
"account_reference": "ALU-2032",
"email": "pais.sitoe@example.co.mz"
},
{
"account_reference": "ALU-2033",
"nuit": "123456789"
},
{
"account_reference": "ALU-2034",
"handle": "@ana.lima"
}
]
}
Response
{
"results": [
{
"account_reference": "ALU-2031",
"result": "enrolled",
"payers_subscribed": 1
},
{
"account_reference": "ALU-2032",
"result": "enrolled",
"payers_subscribed": 0
}
]
}
payers_subscribed: 0 is not a failure: nobody on the channels matches yet. The enrolment is kept and subscribes the person when they join.
2. List and remove enrolments
Your system.
DELETE /v1/biller/payers/{ref} · API reference
GET /v1/biller/payers lists your enrolments. Removing one ends the subscriptions it created; its data is deleted after 30 days.
Events
| Event | What it tells you |
|---|---|
bill_subscription.opted_in | A person was subscribed to an account. |
bill_subscription.offered | Your bills were offered to a person, who has not answered yet. |
bill_subscription.opted_out | A person stopped receiving your bills. |
bill_subscription.ended | A subscription ended (the enrolment was removed). |
Errors that matter here
Every error is application/problem+json with a stable code; branch on the code, not the message. The full list is in the error catalogue.
| Error | When | What to do |
|---|---|---|
403 insufficient_scope | The key lacks | Use a key with the scope. |
400 invalid_request | No lawful basis, a customer with no phone, email, NUIT or @handle, a NUIT that is not 9 digits, or a malformed @handle. | Fix and send again. |
Testing it
Enrol a test customer with the phone of a test payer on a test channel, then present an invoice for that account: it appears in the payer's bills.