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

# Ramp flows

> Send-based and receive-based orders, order statuses and how to report your transfer.

An order (ramp) converts between fiat and stablecoins. The ramp type is inferred from the assets: if you send a token it is an **off-ramp**; if you send fiat it is an **on-ramp**.

## Choose a flow

<Tabs>
  <Tab title="Send based">
    You fix the amount **you send**. Kravata calculates how much you receive after fees.

    1. Quote with [Quote Ramp (Send Based)](/business/api-reference/ramp-orders/quote-ramp-send-based), sending `amountSent`.
    2. Create the order with [Create Ramp (Send Based)](/business/api-reference/ramp-orders/create-ramp-send-based), sending `amountIn`.
  </Tab>

  <Tab title="Receive based">
    You fix the amount **you receive**. Kravata calculates how much you must send, including fees, so the requested amount is delivered in full.

    1. Quote with [Quote Ramp (Receive Based)](/business/api-reference/ramp-orders/quote-ramp-receive-based), sending `amountReceive`.
    2. Create the order with [Create Ramp (Receive Based)](/business/api-reference/ramp-orders/create-ramp-receive-based), sending `amountOut`.
  </Tab>
</Tabs>

### Origin and destination

| Ramp type | `accountOriginId` | `accountDestinationId` |
| - | - | - |
| On-ramp (fiat → stablecoin) | Your bank account | Your wallet |
| Off-ramp (stablecoin → fiat) | Your wallet | Your bank account |

Both must have status `accepted`.

### Locking the quote

Every quote returns a `quoteId` and a `validUntil`. Send the `quoteId` when creating the order to guarantee the quoted rate. A quote can be used once and only until it expires (30 seconds by default).

### Idempotency

Send an `idempotency-key` header (a UUID) when creating an order. If a network error forces you to retry, the same key prevents creating the order twice.

## Report your transfer

After creating the order, send the funds following the deposit instructions in the response (`accountDestination` for on-ramps, `walletDestination` for off-ramps). The order expires 10 minutes after creation if no transfer is reported.

* **Off-ramp**: report the blockchain transaction hash with [Add Transaction Hash](/business/api-reference/ramp-orders/add-transaction-hash).
* **On-ramp**: upload the bank transfer receipt with [Upload Payment Proof](/business/api-reference/ramp-orders/upload-payment-proof).

## Order statuses

| Status | Meaning |
| - | - |
| `pending` | Waiting for your transfer. |
| `received` | Your transaction hash or payment proof was received. |
| `payapproved` | Kravata verified your funds. |
| `payrejected` | The transfer does not meet the requirements. |
| `paymentinprocess` | Kravata is sending the funds to you. |
| `paidawaitingfunds` | The payment was approved and the funds are on their way to your destination. |
| `completed` | The order finished successfully. |
| `cancelled` | The order expired without completion. |
