M-Pesa STK Push
Trigger M-Pesa STK push prompts on customer phones. Collect payments in Kenya with a single method call.
Collect via M-Pesa, cards, and mobile money. Send payouts to 23+ countries. All from a single, type-safe Node.js SDK.
import { PaydClient } from "payd-node-sdk";
const payd = new PaydClient({
apiUsername: process.env.PAYD_API_USERNAME!,
apiPassword: process.env.PAYD_API_PASSWORD!,
});
// Collect KES 500 via M-Pesa
const result = await payd.collections.mpesa({
username: "my_payd_user",
amount: 500,
phoneNumber: "0700000000",
narration: "Order #1234",
callbackUrl: "https://my-server.com/webhook",
});
console.log(result.transactionReference); // "9BD103350408eR"| Region | Countries |
|---|---|
| East Africa | Kenya, Uganda, Tanzania, Rwanda, Ethiopia |
| West Africa | Nigeria, Ghana, Senegal, Cameroon, Ivory Coast, Benin, Guinea, Mali, Burkina Faso, Togo, Niger |
| Southern Africa | South Africa, Zambia, Malawi, Mozambique |
| Central Africa | DRC, Congo Republic |