> ## Documentation Index
> Fetch the complete documentation index at: https://api.tandapay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Accepting payments

> Choose between hosted checkout and direct collection APIs.

There are two ways to collect money with Tanda.

> **[Checkout (recommended)](https://api.tandapay.io/guides/collections/checkout.md)**
>
> One API call returns a link to a Tanda-hosted payment page. The customer picks M-PESA, Airtel Money or bank transfer. You build no payment UI.

> **[Direct APIs](#direct-apis)**
>
> You collect the customer's details in your own app and call the method's endpoint yourself.

## Direct APIs

| Method | Endpoint | What the customer does | Guide |
| :- | :- | :- | :- |
| M-PESA / Airtel Money | [Mobile money charge](https://api.tandapay.io/api-reference/endpoint/mobile-money-charge.md) | Approves a prompt on their phone with their PIN | [Mobile money](https://api.tandapay.io/guides/collections/mobile-money.md) |
| Bank transfer | [Bank transfer](https://api.tandapay.io/api-reference/endpoint/bank-transfer.md) | Transfers the exact amount to a temporary account | [Bank transfer](https://api.tandapay.io/guides/collections/bank-transfer.md) |

## Which should I use?

* **Online checkout, invoices, payment links:** use [checkout](https://api.tandapay.io/guides/collections/checkout.md).
* **You already have the customer's phone number** (wallet top-ups, POS): use a [mobile money charge](https://api.tandapay.io/guides/collections/mobile-money.md). It's one call, and the prompt lands on the customer's phone.
* **Large B2B payments:** use a [bank transfer](https://api.tandapay.io/guides/collections/bank-transfer.md).

## The flow for every method

**1. Start the charge**

Send a unique `externalReference` with every request. Store the `transactionId` Tanda returns next to your order.

**2. Show the customer what to do**

Redirect to the checkout link, tell them to check their phone, or show the virtual account details.

**3. Wait for the outcome**

Listen for `transaction_updated` [webhooks](https://api.tandapay.io/guides/webhooks/overview.md). Use [Get transaction](https://api.tandapay.io/api-reference/endpoint/get-transaction.md) as a fallback.

**4. Fulfil on success only**

Release value when the status is `successful`. A `pending` status or a redirect back to your site is not a payment.

## Steps the customer may need to take

Some charges pause with a `stepRequired` value in the webhook or transaction. The transaction stays pending until the step is done.

| `stepRequired` | What to do |
| :- | :- |
| `otp` | Ask the customer for the code they received, then call [Validate OTP](https://api.tandapay.io/api-reference/endpoint/validate-otp.md). |
| `redirect` | Send the customer to `redirectUrl` to approve the payment, then wait for the final webhook. |

Checkout handles the phone prompt and bank details on the hosted page for you.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.