PesaBridge
Ìwé/Owó tó ń wọlé/Accept payments

Owó tó ń wọlé

Accept payments

Prompt-to-pay, dynamic QR, till and pay bill (C2B), invoices, standing orders and business-to-business requests.

Ìṣẹ́jú 7 láti kà

A kọ àwọn ìtọ́sọ́nà olùgbéṣẹ́ ní èdè Gẹ̀ẹ́sì kí kóòdù, orúkọ àwọn pápá àti àwọn ìfiránṣẹ́ àṣìṣe lè bá API mu gẹ́lẹ́.

Lórí ojú-ìwé yìí
  1. Prompt-to-pay
  2. Charge lifecycle
  3. Idempotency
  4. Dynamic QR (scan to pay)
  5. Till and pay bill (C2B)
  6. Invoices
  7. More ways to get paid

Prompt-to-pay

POST /partner/stk pushes a payment prompt to the customer's phone. They approve with their PIN on their own device; you get the result by webhook.

FieldRequiredDescription
payer_msisdnYesPayer phone in international format, e.g. 254708374149.
amountYesPositive amount in the account currency.
referenceNoYour order or invoice reference, echoed back in the webhook.
callback_urlNoOverrides your default webhook for this one charge.
idemNoIdempotency key. A retry with the same key returns the original charge.

Charge lifecycle

StateMeaningEvent
pendingPrompt sent, waiting for the customer.charge.created
authorisedApproved, settling.
completedMoney moved. transaction holds the ledger reference.charge.completed
declinedThe customer rejected the prompt.charge.declined
expiredNo answer before expiry.charge.expired
failedCould not complete (for example insufficient funds).

Poll GET /partner/status?charge_ref=… if a webhook is late; never assume success from the pending response.

Idempotency

Networks time out. If you don't know whether a charge was created, retry with the same idem value: you get the original charge back instead of a second prompt. Use one key per payment attempt, for example order-9-attempt-1.

Dynamic QR (scan to pay)

POST /partner/qr returns a base64 PNG that customers scan in their app. Show it on a screen, a receipt or an invoice.

Request
{ "amount": 100, "kind": "buygoods", "recipient": "400200", "reference": "INV-1001" }

kind is buygoods (till), paybill or send (to a phone number). recipient defaults to your own short code.

Till and pay bill (C2B)

Customers can also pay your short code from their own app or USSD. Register where confirmations should go with POST /partner/c2b/register; each payment then arrives as a c2b.confirmation event.

In the sandbox, simulate one:

Shell
curl -s https://pesa-bridge.com/api/bridgepay/v1/partner/c2b/simulate \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"msisdn":"254708374149","amount":250,"bill_ref":"ACC-001"}'

Invoices

Bill Manager creates invoices with line items and tax. Set "send": true to push a payment prompt to the customer at once, or send later with POST /partner/bills/send.

POST /partner/bills
{
  "customer_name": "Jane Doe",
  "customer_msisdn": "254708374149",
  "tax_pct": 16,
  "send": true,
  "items": [{ "description": "Consulting", "quantity": 2, "unit_price": 5000 }]
}

More ways to get paid

EndpointWhat it does
POST /partner/standingorderRecurring payment from a customer to your short code; the customer authorises it in their app.
POST /partner/b2b/expressRequest payment from another business (till to till). No money moves until they approve.
POST /partner/loyalty/payAccept loyalty points at checkout; you receive the cash value.
GET /partner/balanceYour collection account balance.

Àwọn onímọ̀-ẹ̀rọ wa ń dáhùn ìbéèrè nípa ìsopọ̀. Fi nọ́mbà ìtọ́kasí ìbéèrè náà ránṣẹ́ sí wa, a ó sì rí ìpè náà gẹ́lẹ́.

Kàn sí ìrànlọ́wọ́