STK push to a bank paybill without Daraja
JMSURF PAY guide · updated 21 November 2026
Many Kenyan businesses are paid into a bank account through the bank's M-Pesa paybill, such as Equity Bank 247247 or KCB 522522. The customer pays the bank's paybill and types the business's account number. This guide shows how to send an M-Pesa prompt (STK push) for that kind of payment, without your own Daraja app.
Why Daraja alone cannot do it
Safaricom Daraja is the official M-Pesa API. To send STK push prompts with it, you go live with a shortcode (a paybill or till) that you manage. Daraja then gives you the passkey for that shortcode, and every prompt is signed with it.
- A bank paybill such as 247247 or 522522 belongs to the bank, not to you. Your bank account is only an account number on it.
- You have no access to the bank's M-Pesa organisation portal and you cannot get its passkey. So you cannot take the bank's paybill live on your own Daraja app.
- The usual result: customers pay through the M-Pesa menu, and someone checks bank SMS alerts and statements by hand to see who paid.
How JMSURF PAY does it
In JMSURF PAY you add the bank as a payment channel: you pick the bank and type your account number. When you request a payment, JMSURF PAY sends the prompt through its own approved Daraja app. The bank's paybill is the receiver and your bank account number is the account.
- The customer sees the prompt, enters the M-Pesa PIN and the money moves from the customer's M-Pesa straight to the bank paybill, into your account.
- JMSURF PAY never holds the money. There is no JMSURF wallet and nothing to withdraw. It sends the request, records M-Pesa's answer and tells your system.
- The bank list has 44 banks, Saccos and microfinance banks, including Equity Bank 247247, KCB 522522 and Co-operative Bank 400200. Any other institution paybill can be typed in under Other paybill.
- Your own reference (for example an invoice number) stays on the payment record, in exports and in webhooks. For bank channels the account sent to M-Pesa is always your bank account number, so the bank credits the right account.
Step by step
- 1Create an account. Sign up at app.jmsurfpay.co.ke and confirm your email. The Free plan has 1 payment channel and up to KES 50,000 processed a month.
- 2Verify your business. Open Verification and upload your documents, including proof that the bank account is yours. Live prompts start once you are verified. You can build and test before that with a test key.
- 3Add the bank as a channel. Open Payment channels, click Add channel, choose Bank, search for your bank, Sacco or microfinance bank and type your account number. Save it.
- 4Copy the channel code. Each channel has a code that starts with
tnnt_. Send it astenantCodeso the money goes to that bank account. - 5Create an API key. Open API & keys, create a key and copy the secret key. Keep it on your server only.
- 6Send a prompt. Use the API below, the Prompt page in the dashboard, or a payment link. No code is needed for the last two.
API example
One call sends the prompt. Use your own secret key, channel code and the customer's number in the form 2547XXXXXXXX.
cURL
curl -X POST https://jmsurfpay.co.ke/api/payments/stkpush \
-H "X-API-Key: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"tenantCode": "YOUR_CHANNEL_CODE",
"phoneNumber": "2547XXXXXXXX",
"amount": 1500,
"accountReference": "INV1001",
"transactionDesc": "Invoice 1001"
}'Node.js
// Node.js 18+ (fetch is built in). Keep the secret key on your server.
const res = await fetch("https://jmsurfpay.co.ke/api/payments/stkpush", {
method: "POST",
headers: {
"X-API-Key": process.env.JMSURFPAY_SECRET_KEY,
"Content-Type": "application/json",
"Idempotency-Key": "invoice-1001", // a retry never sends a second prompt
},
body: JSON.stringify({
tenantCode: process.env.JMSURFPAY_CHANNEL_CODE, // the bank channel
phoneNumber: "2547XXXXXXXX",
amount: 1500,
accountReference: "INV1001",
transactionDesc: "Invoice 1001",
}),
});
const data = await res.json();
// data.checkoutRequestId: keep it to match the webhook or to check the status
console.log(data.checkoutRequestId, data.livemode);Response
{
"checkoutRequestId": "ws_CO_...",
"merchantRequestId": "...",
"responseCode": "0",
"responseDescription": "Success. Request accepted for processing",
"customerMessage": "Success. Request accepted for processing",
"transactionId": 42,
"livemode": true
}The result comes to your server as a signed webhook (payment.completed, payment.failed or payment.cancelled) with the M-Pesa receipt number. You can also check it with GET /api/payments/status/CHECKOUT_REQUEST_ID. See the full STK Push reference.
Whose name shows on the prompt
An honest note
The M-Pesa prompt shows the name registered for the shortcode that sends it. By default prompts go out through the JMSURF TECHNOLOGIES Daraja app, so customers may see that name and not your business name. The money still goes only to your bank account. Tell customers what to expect on your checkout page or invoice.If your business has its own paybill or till with its own Daraja app, add it under Developers, Daraja Whitelisting. Once approved, every prompt goes out through your own shortcode and carries your own business name.
Next
- Build without spending money first: Test mode guide.
- Not sure which way to go: Safaricom Daraja vs JMSURF PAY.
Start on the Free plan: 1 payment channel, up to KES 50,000 a month, test keys included. Questions? WhatsApp +254 712 504 593.