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

# Local rails — hosted checkout

> Accept bank, MoMo, and EFT through Axra's hosted checkout.

Hosted checkout is the fastest way to accept local rails when you do not need to render deposit instructions yourself. Create a checkout session, send the customer to pay.useaxra.com, and let Axra show the rail picker and payment UI.

## 1. Create a checkout session

`POST /business/payment/session`

Set `currency` to any supported local-rail currency (see [Local payment methods](/payments/local-payment-methods) for the full list). Card checkout uses the same endpoint with `usd` or other card currencies.

```bash theme={null}
curl --request POST \
  --url https://api.useaxra.com/api/v1/business/payment/session \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "amount": 10000,
    "currency": "ngn",
    "description": "Order #1042",
    "customerEmail": "adaobi@example.com",
    "successUrl": "https://yourapp.com/payment/success?session={SESSION_ID}",
    "cancelUrl": "https://yourapp.com/payment/cancelled",
    "expiresIn": 1800,
    "metadata": {
      "orderId": "1042"
    }
  }'
```

## 2. Redirect the customer

Send the customer's browser to `checkoutUrl` from the session response. The session id in the URL is the auth context for the session-scoped local-rail endpoints.

## 3. Customer pays via local rail

On pay.useaxra.com the customer chooses bank transfer, mobile money, or instant EFT when the session currency supports it. Axra calls the session-bound local-rail endpoints under the hood:

* `GET /checkout/sessions/{sessionId}/local-rail/channels`
* `POST /checkout/sessions/{sessionId}/local-rail/initiate`
* `GET /checkout/sessions/{sessionId}/local-rail/status`

Your integration only needs the session create call and redirect; you do not call those endpoints unless you are building a custom checkout UI on top of a session.

## 4. Receive webhook + redirect

When the collection completes, Axra redirects the customer to your `successUrl` and sends `payment_link.session.completed` to your webhook URL. Treat the webhook as authoritative — the redirect alone does not guarantee settlement.

## How currencies map to rails

| Session currency | Country      | Rails shown in checkout |
| ---------------- | ------------ | ----------------------- |
| `ngn`            | Nigeria      | Bank transfer (instant) |
| `zar`            | South Africa | Instant EFT             |
| `kes`            | Kenya        | Mobile money (M-PESA)   |
| `tzs`            | Tanzania     | Mobile money, bank      |
| `ugx`            | Uganda       | Mobile money            |
| `rwf`            | Rwanda       | Mobile money            |
| `mwk`            | Malawi       | Mobile money            |
| `zmw`            | Zambia       | Mobile money, bank      |
| `bwp`            | Botswana     | Mobile money, bank      |
| `xaf`            | Cameroon     | Mobile money            |

## When to use this vs. direct API

Hosted checkout is zero-effort when a redirect is acceptable. Use the [server-to-server collections API](/payments/local-rails-api) when you embed deposit instructions in your own app, run backend-to-backend flows, or need channel discovery before showing payment options.
