Business To Pochi
Pay from a business B2C account into a customer's Pochi la Biashara business wallet.
A variant of the B2C API for paying into Pochi la Biashara, the informal-business wallet product Safaricom markets to micro and small merchants.
Endpoint
https://sandbox.safaricom.co.ke/mpesa/b2pochi/v1/paymentrequestOverview
Mechanically this mirrors B2C closely enough that Safaricom's own documentation reuses B2C wording in places (see the callout below); the distinguishing points are the endpoint and the CommandID.
Prerequisites
Same as B2C (Daraja account, sandbox app, InitiatorName/InitiatorPassword, encrypted SecurityCredential, live B2C shortcode with operators created), plus one addition specific to this API:
- The receiving party must actually have a Pochi la Biashara / Micro SME business wallet. Safaricom doesn't document a way to check this ahead of a payment attempt.
Request
{
"OriginatorConversationID": "600997_Test_32et3241ed8yu",
"InitiatorName": "testapi",
"SecurityCredential": "RC6E9WDxXR4b9X2c6z3gp0oC5Th ==",
"CommandID": "BusinessPayToPochi",
"Amount": "10",
"PartyA": "600992",
"PartyB": "254705912645",
"Remarks": "remarked",
"QueueTimeOutURL": "https://mydomain.com/path",
"ResultURL": "https://mydomain.com/path",
"Occassion": "ChristmasPay"
}| Field | Description | Sample value |
|---|---|---|
OriginatorConversationID | Your own unique ID per request. | 600997_Test_32et3241ed8yu |
InitiatorName | API operator username. | johndoe |
SecurityCredential | Encrypted initiator password. | (encrypted string) |
CommandID | BusinessPayToPochi for this API. | BusinessPayToPochi |
PartyA | Your B2C short code. | 600997 |
PartyB | Recipient's MSISDN. | 254705912645 |
Occassion (sic) | Optional, 1 to 100 characters. | Free text |
Defect in the source material
The CommandID field description in Safaricom's own documentation for this
API lists BusinessPayToPochi alongside SalaryPayment, BusinessPayment,
and PromotionPayment as if they were interchangeable options, which is B2C's
set of command IDs, not B2Pochi's. Only BusinessPayToPochi is documented as
valid for this specific endpoint. Occassion is spelled with a double "s" in
the source, kept as-is since it's the literal field name.
Response
{
"ConversationID": "AG_20240706_20106e9209f64bebd05b",
"OriginatorConversationID": "600997_Test_32et3241ed8yu",
"ResponseCode": "0",
"ResponseDescription": "Accept the service request successfully."
}Callback payload
Structurally identical to the B2C callback: ResultType, ResultCode, ResultDesc, TransactionID, and a ResultParameters.ResultParameter array carrying TransactionAmount, TransactionReceipt, ReceiverPartyPublicName, TransactionCompletedDateTime, and the B2C account balance fields (B2CUtilityAccountAvailableFunds, B2CWorkingAccountAvailableFunds, B2CRecipientIsRegisteredCustomer, B2CChargesPaidAccountAvailableFunds).
Testing and Go Live
Same path as B2C: Daraja Simulator with the B2Pochi product attached, or Postman against the sandbox endpoint above. Going live requires the same B2C shortcode/one-account setup described in Organization Portal & Go Live.
FAQs
Yes, if both are enabled for your short code on M-PESA.
No. Safaricom documents this as a manual process on the M-PESA portal, same as B2C.
No, passkeys are specific to M-Pesa Express/STK Push.
Yes, see B2C Account Top Up.