Banks and agents
Paying an invoice (RF) or a biller's reference at the counter
A payer pays a biller's invoice by its RF reference, or a biller's own reference (a meter, a contract), and leaves with the receipt.
Billers on KulPay give every invoice an ISO 11649 reference: RF, two check digits and up to 21 characters (for example RF49 9499 0578 6486). Many billers also have their own references: a meter, a contract, a student number. A payer can pay either at your counter.
There is one important difference from a deposit: your confirmation is trusted. The invoice is paid the moment you confirm, and the answer carries the receipt and any token or PIN to hand the payer. Your statement still follows, but only to reconcile.
Before you start
The same as for a cash deposit: a partner key with transactions:write, transactions:read and reconciliation:write (add bills:read if your cashiers pick a biller from a list), the cash_deposit lookup in your capability matrix, a statement profile covering the receiving account, and an Idempotency-Key on every call that moves money.
The flow at a glance
| # | Who | What happens |
|---|---|---|
| 1 | Payer | Brings an RF reference, or a biller's own reference and the biller's name. |
| 2 | Your system | Looks the reference up; KulPay finds the invoice (or asks the biller) and answers what it pays and the total to take, fee included. |
| 3 | Your system | When the reference names several things, the payer chooses one. |
| 4 | Your system | Registers the deposit intent for the total; KulPay checks the bill still takes it. |
| 5 | Cashier | Takes the cash. |
| 6 | Your system | Confirms; the bill is paid now and the answer carries the receipt and any token. |
| 7 | Your system | Sends the statement later, which reconciles the payment. |
1. Look up the reference
Your system.
POST /v1/name-lookups · API reference
An RF reference needs nothing else: it names one invoice. For a biller's own reference, send the biller the cashier chose (the list is GET /v1/billers) and, optionally, its product; KulPay looks among that biller's invoices and asks its products. A reference without a biller is sent to the billers whose references have that shape (at most 5, 3 seconds each).
The answer's destination is what will be paid: the biller, the invoice number, the customer's name partly hidden, the amount due and the payer's fee. The constraints include the fee: they are the total to take. An invoice that takes partial payments answers min_amount and max_amount instead of exact_amount. When a biller bills on behalf of someone else (a business it collects for), destination.on_behalf_of names them: show it with the biller.
Request
{
"method": "cash_deposit",
"reference": "RF49 9499 0578 6486"
}
Response
{
"lookup_id": "3L2bR9yAu6cLgX3oZdWn8SqItKe",
"status": "found",
"name": "Escola Primária Josina Machel",
"method": "cash_deposit",
"reference": "RF49949905786486",
"destination": {
"option_id": "ESCOLA:INVOICE:FT2026/10/0042",
"kind": "kulpay_invoice",
"biller": "ESCOLA",
"biller_name": "Escola Primária Josina Machel",
"invoice_number": "FT2026/10/0042",
"masked_name": "J*** S***",
"amount_due": "2500.00",
"payer_fee": "25.00"
},
"constraints": {
"currency": "MZN",
"exact_amount": "2525.00",
"expires_at": "2026-10-22T10:15:00Z"
},
"expires_at": "2026-10-22T10:15:00Z"
}
status is found, not_found (with a reason, for example "the invoice is paid") or ambiguous (with options). More than 5 billers claiming the reference's shape answers biller_required with the billers to choose from: ask the payer which, and look up again with biller.
2. Choose an option, when there are several
Your system, only when the lookup answered `ambiguous`.
POST /v1/name-lookups/{id}/select · API reference
A reference can name an invoice and an account, or two products. Show the payer the options (each with its biller, logo and amounts) and send the one they choose. The lookup becomes found with it. KulPay never guesses where money goes.
Request
{
"option_id": "AGUAS:INVOICE:CL-0042"
}
The choice is locked once a deposit starts from the lookup: another choice is 409 option_locked.
3. Register the deposit intent
Your system, before the cashier takes the cash.
POST /v1/cash-deposits/intents · API reference
The amount is the total, fee included ("2525.00" above). KulPay checks the invoice still takes it, so the cashier never takes money for a bill paid in the meantime. Give the payer's phone or email in depositor_metadata: that is where KulPay sends the receipt and any token or PIN. The intent carries destination_kind.
Request
{
"lookup_id": "3L2bR9yAu6cLgX3oZdWn8SqItKe",
"amount": "2525.00",
"currency": "MZN",
"partner_reference": "AG001-000983",
"depositor_metadata": {
"phone": "+258841112233"
}
}
Response
{
"id": "3L3cS0zBv7dMhY4pAeXo9TrJuLf",
"lookup_id": "3L2bR9yAu6cLgX3oZdWn8SqItKe",
"reference": "RF49949905786486",
"amount_minor": 252500,
"currency": "MZN",
"partner_reference": "AG001-000983",
"mode": "live",
"status": "initiated",
"destination_kind": "kulpay_invoice",
"expires_at": "2026-10-23T10:05:00Z",
"created_at": "2026-10-22T10:05:00Z",
"updated_at": "2026-10-22T10:05:00Z"
}
4. Confirm: the bill is paid now
Your system, once the cashier has the cash.
POST /v1/cash-deposits/intents/{id}/confirm · API reference
The same confirmation as a deposit. This time the bill is paid immediately with you as its channel, and the answer adds bill: its status, the amounts, the receipt_url and the artifacts (a token or PIN) to hand the payer.
Request
{
"account": "MZ59000800000000123456789",
"entry_id": "AG001-20261022-0000459",
"value_date": "2026-10-22"
}
Response
{
"intent": {
"id": "3L3cS0zBv7dMhY4pAeXo9TrJuLf",
"status": "completed",
"destination_kind": "kulpay_invoice",
"deposit_id": "3L3cT1aCw8eNiZ5qBfYp0UsKvMg"
},
"deposit": {
"id": "3L3cT1aCw8eNiZ5qBfYp0UsKvMg",
"entry_id": "AG001-20261022-0000459",
"amount_minor": 252500,
"currency": "MZN",
"status": "confirmed"
},
"bill": {
"id": "3L3cU2bDx9fOjA6rCgZq1VtLwNh",
"status": "succeeded",
"biller": "ESCOLA",
"biller_name": "Escola Primária Josina Machel",
"customer_reference": "RF49949905786486",
"amount": "2500.00",
"payer_fee": "25.00",
"total": "2525.00",
"currency": "MZN",
"funding": "deposit",
"receipt_url": "https://gateway.kulpay.pavulla.com/bills/receipt/3L3cU2bDx9fOjA6rCgZq1VtLwNh?t=…",
"artifacts": []
}
}
intent.status is completed (paid), processing (the biller's supplier is still answering: wait for cash_in.completed) or failed (the bill could not be paid: the money is in suspense and KulPay's treasury returns it; do not give the payer a receipt).
5. Send the statement
Your system, as usual.
POST /v1/statements · API reference
The line reconciles the payment already made. A difference between the line and your confirmation is an exception for KulPay's treasury; the bill stays paid.
States
| State | What it means |
|---|---|
initiated | Registered; the bill still takes the amount. |
processing | Confirmed; the biller's supplier is answering. |
completed | The bill is paid. Hand over the receipt and any token. |
failed | The bill could not be paid. The money is in suspense for KulPay's treasury to return. |
When the money moves
The bill is paid when you confirm: the biller is credited and the payer's receipt exists. Your statement arrives later and reconciles it; a difference becomes an exception for KulPay's treasury, never an unpaid bill.
Events
| Event | What it tells you |
|---|---|
cash_in.initiated | An intent was registered. |
cash_in.initiation_confirmed | You confirmed it; the bill is processing or paid. |
cash_in.completed | The bill is paid (with its receipt and any token), or it failed and the money is in suspense. |
name_lookup.option_selected | An option was chosen for an ambiguous reference. |
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 |
|---|---|---|
422 deposit_refused | The invoice no longer takes the amount (paid or cancelled meanwhile), the amount is not the total, or the lookup expired. | Read the |
409 option_locked | Another option was chosen after a deposit started from the lookup. | Keep the first choice, or start a new lookup. |
503 biller_unavailable | The billers that could own the reference did not answer in time. | Retry after |
422 route_not_enabled | Cash deposits are not enabled for your key's mode. | Ask KulPay to enable them. |
Testing it
KulPay gives you RF references of test invoices for your integration environment. Each can be paid once: after that the lookup answers not_found with "the invoice is paid". Ask for new ones when you run out.