Fortpesa gives you two ways to collect M-Pesa: an STK Push you trigger from your own checkout, and a payment link you share as a URL. Both settle into the same account, show up in the same dashboard and cost the same. The difference is entirely about where the customer meets you.
The one-paragraph version
- STK Push: your system asks Fortpesa to prompt a specific phone number for a specific amount. The customer never leaves your page.
- Payment link: you send the customer a URL. The Fortpesa pay page collects the amount and phone, then prompts their phone.
How a payment link flow goes
- You create a link in the dashboard — fixed amount or open amount.
- You share it: WhatsApp message, invoice, Instagram bio, PDF statement.
- The customer opens it, sees your logo and the amount, types their M-Pesa number.
- The prompt hits their phone, they enter their PIN, payment confirmed.
- You get a webhook (or refresh the dashboard) and fulfil the order.
Nothing to host, nothing to code. The fastest path from "customer wants to pay" to "money in your account" is usually a link — especially if you are selling in a chat window.
How an STK Push flow goes
- The customer fills your checkout form: amount, phone, maybe an order ID.
- Your backend calls the API with
channel_id, amount and phone. - The prompt appears on their phone while they are still on your site.
- Your system waits for confirmation — poll the transaction or receive the webhook.
- Order marked paid, receipt rendered, customer never left your domain.
This is the right shape when payment is part of a bigger flow: cart → checkout → pay → access granted, with no context switch.
Side by side
| STK Push API | Payment link | |
|---|---|---|
| Who collects the amount | Your system | Customer (on open links) or you (on fixed links) |
| Customer stays on your site | Yes | No — they open the Fortpesa pay page |
| Code required | Yes — one API call + webhook handling | None |
| Works in a chat message | No | Yes |
| Open-amount requests | No — your system states the total | Yes |
| Custom checkout design | Fully yours | Standard Fortpesa pay page |
| Same fee, receipts, dashboard | Yes | Yes |
Choose by selling motion, not by technology
Use payment links when:
- You sell through WhatsApp, Telegram, TikTok or Instagram.
- You quote first, invoice second (services, deposits, custom orders).
- You want colleagues to collect without touching an API key.
Use STK Push when:
- Customers buy through your website or app and expect instant confirmation.
- You need payment to gate something automatically — downloads, account upgrades, order submission.
- The amount is calculated by your system (cart totals, variable quantities).
Use both when your motion is hybrid: a link for the "can I pay?" crowd and an API checkout for the store — the transactions land side by side in your dashboard either way.
Common questions
Do they cost differently? No — the fee schedule is per-transaction, not per-method.
Can I move from links to the API later? Instantly. Your account, channel and wallet are shared; the API is just a new way to trigger the same engine.
What if the customer never enters their PIN? An unanswered prompt expires without charging anything. Nothing is captured until M-Pesa confirms.
Next steps
- New to collecting on your site? Start with How to accept M-Pesa payments on your website.
- Developers: jump straight to the API quickstart.
- Selling from a phone only? Create an account, make your first link and send it to yourself to try the full loop.