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

# Kenya

# Kenya (KE / KES)

Kenya supports **M-PESA mobile money** and **bank** rails for OnRamp and OffRamp.

## Discovery

```bash theme={null}
# OnRamp providers (momo + bank)
curl -sS "$BASE/partner/catalog?country=KE&order_type=OnRamp" \
  -H "X-API-Key: $API_KEY" | jq '.data.onramp.countries.KE'

# Field requirements (retail default)
curl -sS "$BASE/partner/order-requirements?country=KE&currency=KES&order_type=OnRamp" \
  -H "X-API-Key: $API_KEY" | jq '.data'

# Institution (B2B) field requirements
curl -sS "$BASE/partner/order-requirements?country=KE&currency=KES&order_type=OffRamp&customer_type=institution" \
  -H "X-API-Key: $API_KEY" | jq '.data'
```

## Sandbox test values

Full matrix: [Sandbox success & failure](/sandbox/success-failure). **Sandbox only** — live uses real customer phones / accounts.

| Field                   | Success                                              | Failure                                            |
| ----------------------- | ---------------------------------------------------- | -------------------------------------------------- |
| Momo `phone_number`     | `+2541111111111`                                     | `+2540000000000`                                   |
| Bank `account_number`   | `1111111111`                                         | `0000000000`                                       |
| `customer.name`         | Two+ words, e.g. `Jane Doe`                          | Same for OnRamp; failure phone/account drives fail |
| OffRamp `customer.name` | Include **`Successful`**, e.g. `Successful Jane Doe` | Include **`Failure`**                              |

### Example network IDs (sandbox — verify via catalog)

| Rail                   | Example `network_id`                   |
| ---------------------- | -------------------------------------- |
| Safaricom M-PESA       | `7ea6df5c-6bba-46b2-a7e6-f511959e7edb` |
| National Bank of Kenya | `30f11b2e-0905-4c09-ba5f-d05aa4e4a11c` |

## OnRamp (momo)

Customer pays KES via M-PESA → receives USDC/USDT on your `wallet_address`.

See [Quickstart](/quickstart) for a full curl.

## OffRamp (momo)

Use **Polygon USDT** on the quote:

| Field            | Value                                        |
| ---------------- | -------------------------------------------- |
| `asset.currency` | `USDT`                                       |
| `asset.network`  | `POLYGON`                                    |
| `asset.token`    | `0xc2132d05d31c914a87c6611c10748aeb04b58e8f` |

**Sandbox:** do **not** send crypto on-chain. Include **`Successful`** in `customer.name` and use success phone `+2541111111111` so the crypto leg auto-credits. Details: [Sandbox success & failure](/sandbox/success-failure).

**Production:** after accept, the customer sends the exact crypto amount to the deposit wallet in `data.accepted.payment_instructions.crypto_deposit` before `expires_at`.

1. Quote with `order_type: OffRamp`, `crypto_amount`, Polygon USDT `asset`, `refund_address`
2. Accept → for live, read `payment_instructions.crypto_deposit`
3. Sandbox: wait for webhook; production: customer sends exact amount before `expires_at`
4. Webhook `order.settled` when fiat is paid out to momo

<Warning>
  OffRamp deposit address is **per order** from accept. Do not reuse across orders. Sandbox on-chain sends (e.g. testnet USDC/USDT) are not a supported settle path — use the `Successful` name trigger instead.
</Warning>

## Bank rail

Use `payment_method.type: bank` and `network_id` from payment-methods (preferred) or catalog. Provider lists differ by direction — look up with the same `country` and `order_type` as the quote (do not reuse an OnRamp id on OffRamp).

```bash theme={null}
curl -sS "$BASE/partner/payment-methods?country=KE&order_type=OnRamp" \
  -H "X-API-Key: $API_KEY" | jq .

curl -sS "$BASE/partner/payment-methods?country=KE&order_type=OffRamp" \
  -H "X-API-Key: $API_KEY" | jq .

# Also in catalog under payment_methods.bank.providers[] (filter catalog by the quote’s order_type)
curl -sS "$BASE/partner/catalog?country=KE&order_type=OnRamp" \
  -H "X-API-Key: $API_KEY" | jq '.data.onramp.countries.KE.payment_methods.bank.providers'
```

For momo, use catalog or payment-methods only — **`GET /partner/banks` returns 422 for `mobile_money`** and is not the primary path for African local fiat bank institutions.

## Institution (B2B)

Same OnRamp/OffRamp quote body as retail; set `customer_type: "institution"` and `customer.type: "institution"`. Required customer fields: `uid`, `business_name`, `business_id`, `email` — no DOB, national ID, or personal `name`. `business_id` is the paying business’s legal registration/tax id (not an Element Pay console id).

For bank rails, the payee is `payment_method.account_name` + `account_number` + `network_id` (payee company may differ from the paying business). Discover exact fields with `customer_type=institution` on order-requirements (above). Copy-paste OffRamp bank example: [Sandbox test payloads](/sandbox/test-payloads).
