Mpesa supports two types of merchant accounts; Paybill and Till Number. The below setup guidelines will assist you in setting up the two accounts on Peach Console.
Paybill
Configuration details to be shared by the merchant
Pass Key
Consumer Key
Consumer Secret
Initiator Name
Paybill
Setting up on the console
Create a merchant account
Add the Live configuration as follows
Party B - Paybill Number
Business Shortcode - Paybill Number
Passkey - Pass Key as shared by the merchant
Consumer Key - Consumer Key as shared by the merchant
Consumer Secret - Consumer Secret as shared by the merchant
Initiator Name - Initiator Name as shared by the merchant
Account Type - Select Paybill
Create a channel and attach the Merchant account to it
Till Number
Configuration details to be shared by the merchant
Pass Key
Consumer Key
Consumer Secret
Initiator Name
Till Number
Store Number
Create a Merchant Account
Add the Live configuration as follows
Party B - Till Number
Business Shortcode - Store Number
Passkey - Pass Key as shared by the merchant
Consumer Key - Consumer Key as shared by the merchant
Consumer Secret - Consumer Secret as shared by the merchant
Initiator Name - Initiator Name as shared by the merchant
Account Type - Select Till Number
Create a channel and attach the Merchant account to it
Differentiating API requests between a Till Number and a Paybill
Till Number - The Transaction type is CustomerBuyGoodsOnline
"request_data": {
"AccountReference": "M-Pesa_23",
"Amount": "1",
"BusinessShortCode": "566777",
"CallBackURL": "https://qaapi.ppay.io/webhooks/mpesa/",
"PartyA": "254727038986",
"PartyB": "174379",
"Password": "XXXXXXX",
"PhoneNumber": "254727038986",
"Timestamp": "202203XXXXXXX5402",
"TransactionDesc": "Margaret Paypal Demo",
"TransactionType": "CustomerBuyGoodsOnline"
},
"url": "https://sandbox.safaricom.co.ke/mpesa/stkpush/v1/processrequest"
},
Paybill - The Transaction type is CustomerPayBillOnline
"request_data": {
"AccountReference": "4654bd9f-",
"Amount": "288",
"BusinessShortCode": "684065",
"CallBackURL": "https://api.peachpayments.com/webhooks/mpesa/",
"PartyA": "254113658075",
"PartyB": "684065",
"Password": "XXXXXXX",
"PhoneNumber": "254113658075",
"Timestamp": "202203XXXXXXX3320",
"TransactionDesc": "test",
"TransactionType": "CustomerPayBillOnline"
},