This API accepts customer deposits through M-Token hosted checkout on
pesaconnect.io.
You create a payment with the Connect Africa collection API, redirect the customer to the returned checkout URL,
and credit them only after the webhook reports success.
Purpose: Collect deposits via a hosted P2P checkout. The customer pays a verified agent in local mobile money.
Target Audience: Merchants, gaming platforms, and developers integrating Connect Africa payins.
Channel: Always 420001. The corridor is selected from currency.
Quickstart: M-Token Deposit
Obtain your Bearer Token and generate the required signature and x-hash.
POST to /api/v2/payment/ with channel 420001 and the wallet currency.
Read data.redirect_url and send the customer to that page.
Wait for the webhook on your result_url. Credit only when result_code is 0.
You can also poll Transaction Query with the returned transaction_id.
Endpoint Reference
HTTP Method
POST
Endpoint URL
/api/v2/payment/
Base URL
https://base-url-here.com
Channel
420001
Type
Hosted checkout (redirect)
Description
Initiate an M-Token hosted checkout deposit into your business wallet.
Request Body
Field
Type
Description
Required
wallet_no
string
Business wallet account number. Must match currency.
Yes
reference
string
Your unique order reference.
Yes
acc_name
string
Customer / payer name shown on hosted checkout (minimum 2 characters).
Yes
acc_no
string
Customer phone in international format without +, e.g. 254712345678. Prefills checkout when valid.
No
email
string
Customer email used for the PesaConnect deposit receipt. Falls back to the wallet holder email if omitted.
Recommended
amount
numeric
Order amount in major units (integer, no thousands separators). Example: 1000 for KES 1,000.
Yes
currency
string
Selects the PesaConnect corridor. See supported currencies below.
Yes
channel
numeric
Always 420001.
Yes
description
string
Short payment description.
Yes
result_url
string
HTTPS URL on your server for the final SUCCESS / FAILED webhook.
Yes
Supported Currencies
Always send channel 420001. The corridor is selected from currency:
Currency
Market
Example phone (acc_no)
KES
Kenya
254712345678
TZS
Tanzania
255712345678
UGX
Uganda
256712345678
ETB
Ethiopia
251912345678
SOS
Somalia
252612345678
RWF
Rwanda
250712345678
BIF
Burundi
257712345678
NGN
Nigeria
2348012345678
GHS
Ghana
233241234567
XOF
West Africa
2250712345678
Request Headers
Header
Type
Description
Required
Authorization
string
Bearer token used to access the API
Yes
Signature
string
SHA-256 signature. Concatenate channel+reference+currency+amount, sign with your private key, and Base64 encode.
Redirect the customer to redirect_url. Do not credit them until the webhook reports success.
Webhook
Same Connect Africa callback as other collections. See
Webhook Callback.
Credit only when result_code is 0 (status SUCCESS).
Pending, cancelled, or expired checkouts stay PENDING or move to FAILED.
Sample success callback
{
"channel": "420001",
"reference": "DEP-123456",
"transaction_id": "126091400001",
"third_party_id": "0199a1c2-...",
"currency": "KES",
"amount": "1000",
"fees": "0",
"acc_name": "Jane Doe",
"result_code": 0,
"result_description": "The service request is processed successfully.",
"hash": "c920aaebae731f9e16d9a8f1fc1e349b99313cf230f18126a0bbd07d64aac2e0"
}
Notes
Checkout sessions expire after 15 minutes on PesaConnect if the customer does not lock an order.
The customer pays a verified agent in mobile money. Connect Africa credits your wallet after dual confirmation (customer paid + agent confirmed).
Allocate channel 420001 to the merchant wallet in tenant-admin before going live.
Unsupported currencies return an error. Use one of the currencies in the table above.
Phone validation is skipped for this channel. Send E.164 digits in acc_no when you want checkout prefilled.
Security Best Practices
Always use HTTPS for all API requests and your result_url.
Keep your private key secure and never share it.
Verify the webhook hash on every callback before crediting the customer.
Treat redirect_url as a one-time checkout session. Do not reuse it for a different amount or customer.