Who this guide is for
Use this guide if you are an aggregator or a high-volume merchant that needs:- Dedicated M-Pesa shortcode routing
- Sub-merchant level transaction attribution
- Advanced payout routing controls
If you do not need dedicated shortcode routing or sub-merchant attribution, use the standard endpoint payloads and only send required fields.
Integration paths
| Path | Best for | Payload style |
|---|---|---|
| Standard merchant path | Most merchants | Required fields only |
| Enterprise path | Aggregators and large merchants | Required + enterprise fields |
Enterprise-only fields by endpoint
The table below lists fields marked with the ENTERPRISE badge in the API reference.| Endpoint | Field | Notes |
|---|---|---|
POST /v1/mpesa/charge | shortcode ENTERPRISE | Route via your dedicated collections shortcode |
POST /v1/mpesa/charge | subMerchantId ENTERPRISE | Auto-created on first use if missing; blocked only when suspended |
POST /v1/mpesa/charge | metadata.subMerchantDetails ENTERPRISE | Optional enrichment details for first-time auto-create |
POST /v1/mpesa/b2c | shortcode ENTERPRISE | Route via your dedicated payouts shortcode |
POST /v1/mpesa/b2c | subMerchantId ENTERPRISE | Auto-created on first use if missing; blocked only when suspended |
POST /v1/mpesa/b2c | metadata.subMerchantDetails ENTERPRISE | Optional enrichment details for first-time auto-create |
POST /v1/mpesa/b2b | shortcode ENTERPRISE | Route via your dedicated payouts shortcode |
POST /v1/mpesa/b2b | subMerchantId ENTERPRISE | Auto-created on first use if missing; blocked only when suspended |
POST /v1/mpesa/b2b | metadata.subMerchantDetails ENTERPRISE | Optional enrichment details for first-time auto-create |
End-to-end enterprise setup
Provision dedicated shortcodes
Work with Fingo to provision dedicated shortcode setup for your organization.
- Collections traffic is routed through your collections shortcode.
- Payout traffic is routed through your payouts shortcode.
Set up sub-merchants (if applicable)
You can pass
subMerchantId directly in requests.- If the ID does not exist yet for your organization, Fingo auto-creates it in
activestate. - If the ID exists and is
suspended, the request is rejected. - You can pass
metadata.subMerchantDetailsto enrich first-time auto-created records.
Start with minimal payloads
Go live first with required fields only, then add enterprise-only fields where you need deterministic routing.
Add enterprise routing fields intentionally
Add
shortcode and subMerchantId only on flows that require them.Request patterns
C2B charge
B2C payout
B2B transfer
Common mistakes to avoid
- Sending dedicated
shortcodevalues that do not belong to your organization - Reusing idempotency keys with different request bodies
- Including optional routing fields in all requests by default