Skip to main content
Pesaswap supports three mobile money wallets in Kenya: M-Pesa Express, Airtel Money, and MTN MoMo. All three use the same request shape — the only thing that changes is payment_method_type. In every case, the customer approves the payment on their own handset; you never collect a PIN or OTP yourself.
You need an API key, a profile_id, and a customer_id before making a wallet payment.

Request

Send a POST request to /payments with payment_method: "wallet" and confirm: true. This creates the payment and immediately confirms it, which triggers the prompt on the customer’s phone. The example below uses M-Pesa Express (m_pesa_express).
To use a different wallet, change payment_method_type and currency — everything else in the request stays the same.

Response

A successful call returns a 200 with a payment object. The fields that matter right now:
The money has not moved yet. status: requires_customer_action means the prompt is now on the customer’s phone, waiting for them to approve or decline. Nothing settles until they respond.

What to do next

Poll GET /payments/{payment_id}?force_sync=true until the status settles. See the quickstart for the full polling loop.
force_sync defaults to false. Without it, this endpoint returns the last stored status — it does not contact the connector. If you omit force_sync=true, your polling loop will keep reading a stale requires_customer_action status and will never see the payment settle.

Status reference

Common errors

It is a separate field from phone — do not prefix the number with the country code yourself. Sending 254 in both phone and phone_country_code will send the prompt to the wrong number or fail validation.
Each wallet (M-Pesa Express, Airtel Money, MTN MoMo) has to be connected on the profile_id you’re using. A request for a wallet that isn’t configured fails before any prompt is sent.
If the customer ignores the prompt, the payment stays in requires_customer_action until the prompt expires, then moves to failed. There’s nothing to retry on your side except creating a new payment.

Next steps

Quickstart

The full create-and-poll payment loop.

Card payments and 3DS

Accept cards with 3DS redirects.

Mandates and recurring

Save a wallet for repeat charges.

Refunds

Refund a settled wallet payment.