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

# Order Statuses

> What each orderStatus value means for fiat_to_crypto, crypto_to_fiat, and fiat_to_fiat orders, and which statuses end an order.

`GET /v2/order/detail` and `GET /v2/orders` return the state of an order in the integer field `orderStatus`. Ramp orders (`fiat_to_crypto` and `crypto_to_fiat`) and global payment orders (`fiat_to_fiat`) use two different sets of codes.

> [!WARNING]
>
> Always read `orderStatus` together with `orderType`. Some codes mean different things in the two sets: `71` is "Cancelling" for a ramp order but "Pay-in cancelled" for a global payment order, and `72` is "Refunded" for a ramp order but "Payout cancelled" for a global payment order.

## Ramp orders (fiat\_to\_crypto, crypto\_to\_fiat)

| Code | Name | Meaning | Ends the order |
| - | - | - | - |
| `10` | Reviewing | The order is under review. | No |
| `11` | Risk review | The order is under risk review. You can upload supporting documents with [Upload Documents](https://docs.velafi.com/api-reference/order/upload-invoice-documents-for-a-specific-order.md); the order then moves to `12`. | No |
| `12` | RFI documents uploaded | Documents were uploaded during the risk review and are waiting for a decision. If the risk review rejects the order, it moves to `81` (or to `71` first, see below). | No |
| `31` | Supporting documents pending | Supporting documents are required. After you upload them with [Upload Documents](https://docs.velafi.com/api-reference/order/upload-invoice-documents-for-a-specific-order.md), the order moves to `40`. | No |
| `32` | Awaiting crypto deposit | `crypto_to_fiat` only. The order was accepted although your crypto balance did not cover it (post-funded off-ramp). `GET /v2/order/detail` returns `orderExpireTimestamp` only in this status. The order can move on to `40` (or `31` if documents are required) only if your balance covers it before `orderExpireTimestamp`. | No |
| `40` | Pending payment | `fiat_to_crypto`: waiting for the fiat payment. `crypto_to_fiat`: the crypto has already been taken from your balance and the fiat payout is pending. | No |
| `50` | Paid | The payment step is done but the order is not completed yet. For `crypto_to_fiat`, you can complete the order with [Confirm Order](https://docs.velafi.com/api-reference/order/confirm-a-specific-order.md). If you do not confirm it, an order on an automated payout channel is completed automatically some time after its payout succeeds. | No |
| `60` | Completed | The order is complete. A completed order can still be refunded, for example when its fiat payout is returned: it then moves to `73` (Refunding) and then `72`, or directly to `72`. | Yes, unless it is later refunded |
| `70` | Cancelled | The order was cancelled. Orders that expired without payment are also returned as `70`. | Yes |
| `71` | Cancelling | The order is being cancelled or rejected, but returning the crypto of a `crypto_to_fiat` order failed. A scheduled job finishes it. | No |
| `72` | Refunded | The refund is complete. | Yes |
| `73` | Refunding | A refund is in progress. | No |
| `80` | Rejected | The order was rejected in review. Orders whose review timed out are also returned as `80`. | Yes |
| `81` | Risk review rejected | The order was rejected in the risk review (from `11` or `12`). | Yes |

A new order created through the API normally starts in `10`, `11`, `31`, `32` (`crypto_to_fiat` only) or `40`. For a `crypto_to_fiat` order, if the crypto cannot be taken from your balance when the order is created, the create call still returns an `orderId`, but the order is already `70` (Cancelled) when you query it.

> [!NOTE]
>
> `GET /v2/orders` lists every order on your account for the requested `orderType`, not only orders you created through the API. Orders that VelaFi creates for your account (not through the API or the dashboard) can also show `20` (review rejected) or `30` (approved). Orders created through the API skip these two codes. When approved, they normally move from `10` to `31`, `32` or `40`; if the price has moved below VelaFi's minimum rate by the time of approval, the order is cancelled instead (`70`, or `71` first as described above). A review rejection is reported as `80` (or `71` first, as described above).

### How internal statuses are reported

VelaFi stores a few internal statuses that the API reports under another code. You never receive `0`, `90`, `91` or `92` for a ramp order:

| Internal status | Reported as |
| - | - |
| `0` (initialising) | `10` |
| `90` (review timed out) | `80` |
| `91` (unpaid, timed out) | `70` |
| `92` (insufficient balance, timed out) | `70` |

## Global payment orders (fiat\_to\_fiat)

| Code | Name | Meaning | Ends the order |
| - | - | - | - |
| `10` | Reviewing | The order is under review. | No |
| `11` | Risk review | The order is under risk review. You can upload supporting documents with [Upload Documents](https://docs.velafi.com/api-reference/order/upload-invoice-documents-for-a-specific-order.md); the order then moves to `12`. | No |
| `12` | RFI documents uploaded | Documents were uploaded during the risk review and are waiting for a decision. | No |
| `31` | Supporting documents pending | Supporting documents are required and none have been uploaded yet. After you upload them, the order shows `41` or `51` again. | No |
| `41` | Pay-in pending | Waiting for the sender's fiat deposit. | No |
| `51` | Payout pending | The pay-in leg is complete and the payout leg is in progress. | No |
| `60` | Completed | The payout leg is complete. | Yes |
| `71` | Pay-in cancelled | The pay-in leg was cancelled. Orders rejected in review or whose review timed out are also returned as `71`. | Yes |
| `72` | Payout cancelled | The payout leg was cancelled. | Yes |
| `90` | Risk review rejected | The order was rejected in the risk review. | Yes |

### How internal statuses are reported

Some internal statuses are reported under another code:

| Internal status | Reported as |
| - | - |
| `0` (initialising) | `10` |
| `30` (approved) | `41`, or `31` if documents are required and missing |
| `40` (pay-in received) | `51` |
| `41`, `51` | Unchanged, or `31` if documents are required and missing |
| `73` (review timed out) | `71` |
| `90` (review rejected) | `71` |
| `91` (risk review rejected) | `90` |

## Filtering by status

`GET /v2/orders` accepts an `orderStatus` filter. `0` (the default) returns all statuses.

* **Ramp orders:** filter by any code in the ramp table. `10`, `70` and `80` also match the internal statuses reported under them, so the results match the `orderStatus` you see.
* **Global payment orders:** the filter is applied to the stored status, not the reported one. `10`, `11`, `12`, `60` and `72` match exactly. `41` and `51` can also return orders reported as `31`. Filtering by `31`, `71` or `90` does not return exactly the orders reported with that code.

## Webhooks

Webhook payloads use their own status mapping. For example, ramp orders in `80` or `81` are pushed as `70`. See the webhook pages, for example the [fiat/crypto order push](https://docs.velafi.com/api-reference/webhooks/fiat-crypto-order-message-push.md), for the pushed values.


## Related topics

- [Create a Global Payment Order](https://docs.velafi.com/api-reference/order/create-a-fiat-to-fiat-order.md)
- [On-Ramp (Fiat to Crypto)](https://docs.velafi.com/docs/guides/on-ramp.md)
- [Global Payments (Fiat to Fiat)](https://docs.velafi.com/docs/guides/global-payments.md)
- [Order Event](https://docs.velafi.com/api-reference/webhooks/fiat-crypto-order-message-push.md)
- [Webhooks](https://docs.velafi.com/docs/guides/webhooks.md)


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