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

# Onramp API

> Collect KES from a customer's phone and receive USDC in your own wallet. The reverse of the off-ramp API, non-custodial and provider-agnostic.

The onramp API collects money from a customer's phone and delivers USDC to **your own wallet**. It is the mirror of the [off-ramp API](/offramp/overview): off-ramp sends USDC out to a recipient, onramp brings local currency in as USDC.

Use it to accept cash-like payments from people who don't hold crypto: top up a wallet balance, fund an account, or collect on behalf of your own customers, without ever touching the currency yourself.

## Non-custodial by design

Minisend never holds the USDC. The customer pays with a mobile money prompt on their phone, and the equivalent USDC is released directly to the Base address you specify when creating the order. If a payout cannot be delivered, nothing was collected in the first place, so there is nothing to refund.

## How it works

<Steps>
  <Step title="Quote">
    `POST /api/onramp/quote` returns the rate and the fee for a given amount, in either direction.
  </Step>

  <Step title="Create an order">
    `POST /api/onramp/orders` creates the order and sends a payment prompt to the customer's phone in the same call.
  </Step>

  <Step title="Customer pays">
    The customer confirms the prompt on their phone. No further action from you.
  </Step>

  <Step title="USDC arrives">
    Once payment is confirmed, USDC lands at the address you provided. An `onramp.completed` webhook fires immediately, and `onramp.released` follows once the on-chain transfer is confirmed.
  </Step>
</Steps>

## Order lifecycle

| Status      | Meaning                                                                  |
| ----------- | ------------------------------------------------------------------------ |
| `pending`   | Payment prompt sent, waiting for the customer to confirm                 |
| `completed` | Payment collected. USDC released to your address                         |
| `failed`    | The customer cancelled, the prompt timed out, or funds were insufficient |
| `expired`   | No payment within the order window                                       |

`completed`, `failed`, and `expired` are final. Each order is one-shot: a failed or expired order is never retried automatically. Create a new order if the customer wants to try again.

## Fees and rates

The fee is **1%**, always collected on top of the amount you receive. You can quote either direction:

| You specify                                 | Customer is charged                   | You receive                                |
| ------------------------------------------- | ------------------------------------- | ------------------------------------------ |
| The USDC amount you want to receive         | That amount converted to KES, plus 1% | Exactly the USDC amount you asked for      |
| The exact KES amount to charge the customer | That amount as typed                  | The KES amount minus 1%, converted to USDC |

Every quote returns both figures so you can show the customer the exact prompt amount before creating the order.

## Limits

Orders accept **KES 20 to KES 250,000** per transaction, checked at quote time. Only KES (M-Pesa) is supported in this version.

## Getting access

Onramp access is enabled per account. [Contact Minisend](https://t.me/minisendapp) to activate it. Once enabled, your existing `ms_live_` API key carries the `onramp` scope and every endpoint in this section works. Calls without the scope return `403`.

<Card title="Make your first collection" icon="arrow-right" href="/onramp/quickstart">
  Quote, create an order, and confirm a collection end to end.
</Card>
