1. Create a session
Call Create checkout session from your server.Response
Options
string
Show only one method:
momo (M-PESA and Airtel Money) or bank. Leave it out to let the customer choose from everything enabled on your account.string
Your own ID for the customer. It comes back on the transaction, so you can match payments to customers.
object
firstName, lastName, email, accountName and phoneNumber (E.164, e.g. +254712345678) to fill in for the customer. Prefilled values can’t be edited on the payment page, so only send details you’re sure of.string
Where Tanda sends the customer after a successful payment.
string
Where Tanda sends the customer after a failed payment.
string
Where Tanda sends the customer if they cancel. All three redirect URLs are optional but recommended.
2. Redirect the customer
Send the customer topaymentSdkLink exactly as returned. Don’t build or modify the URL yourself. On the page they pick M-PESA, Airtel Money or bank transfer and complete the payment.
3. Handle the return
When the customer finishes, Tanda redirects them to the matching URL. Use this page to show a message such as “We’re confirming your payment”.4. Confirm and fulfil
You’ll receivetransaction_updated webhooks as the payment progresses. Before you fulfil, confirm the outcome from your server with Get transaction, using the transactionId or your externalReference.
Response
Good practice
- Create a new session, with a new
externalReference, for every attempt. - Store
transactionIdagainst your order as soon as the session is created, so webhooks can find the order. - Make your fulfilment idempotent: the same webhook can arrive more than once.
- Use Get checkout methods if you want to show method logos before the customer leaves your site.

