Skip to main content

Collect payments

MethodBest forCountries
M-Pesa STK PushCharging a Kenyan phone directly from your serverKE
Mobile money pushCharging mobile money outside KenyaUG, TZ, RW, CD, GH, NG, SN, CI, BF, CM
CheckoutA hosted payment page (cards, M-Pesa, Apple Pay, Google Pay, bank, crypto)Global
Payment linksA no-code shareable link or QR codeGlobal
Payment requestsEmailing a customer an invoice to payGlobal
Bank and agent depositsStanding account numbers, Co-op agent depositsKE

See Countries for the methods and currencies available in each country.

The invoice​

Every payment attempt creates an invoice. Track it by invoice_id.

stateMeaning
PENDINGCreated; not yet sent to the provider
PROCESSINGSent: the customer has a prompt or has been redirected
RETRYBeing retried. For example, after an M-Pesa timeout the customer receives paybill instructions
PARTIALPart of the amount was paid
COMPLETEPaid
FAILEDFailed. See failed_reason and failed_code
CANCELEDCancelled

Key invoice fields: invoice_id, state, provider, value, charges, net_amount, currency, account (the phone or email), api_ref (your reference), provider_ref (for example the M-Pesa receipt), failed_reason, failed_code and clearing_status.

Clearing

Most completed payments first land as CLEARING in your wallet, and become AVAILABLE once they settle. clearing_status on the invoice shows which one applies.

Check payment status​

curl -X POST https://api.intasend.com/api/v1/payment/status/ \
-H "Authorization: Bearer $INTASEND_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"invoice_id": "ABC123"}'

This endpoint also accepts a publishable key, so your frontend can poll it.

{
"invoice": {
"invoice_id": "ABC123",
"state": "COMPLETE",
"provider": "M-PESA",
"value": 100,
"charges": 3,
"net_amount": 97,
"currency": "KES",
"account": "254712345678",
"api_ref": "order-123",
"provider_ref": "QWE123RTY",
"failed_reason": null,
"failed_code": null
},
"meta": {"customer": {"phone_number": "254712345678", "email": null}}
}

Rather than polling, subscribe to the collection_event webhook, which fires on every state change.

Who pays the fees​

Most collection endpoints accept a tariff field (mobile_tarrif, card_tarrif, bank_tarrif, …):

  • BUSINESS-PAYS: the fee is deducted from what you receive.
  • CUSTOMER-PAYS: the fee is added to the amount the customer pays.

If you omit it, your account default applies.