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

# Sell order

> Create a routed sell order.

Create sell orders with `POST /api/developer/orders`.

When you create a sell order, RampHub also creates the matching order intent automatically. If you need to show the active payment window or let support extend it, see [Order intent](order-intent).

If the same customer, token, and network already has an active order window, RampHub returns a structured `PAYCHAIN_ACTIVE_INTENT_CONFLICT` response. Your app can use the [Order intent](order-intent) endpoint to show the current window first, or resend the order with `overrideActiveIntent: true` if the customer wants to replace it.

## Request body

### Required on every order

* `side`
* `amount`
* `fiatCurrency`
* `asset`
* `chain`

### Sell orders

For sells, send resolved bank details instead of `walletAddress`.

Required:

* `bankCode`
* `accountNumber`
* `accountName`

Optional but useful:

* `bankName`
* `email`
* `externalCustomerId`
* `developerFeePercent`
* `overrideActiveIntent`

If you need to render the accepted banks for a specific provider before the user submits the order, call [Provider bank list](provider-bank-list) and use the returned `bankCode` values in the sell form.

```bash theme={null}
curl -X POST "https://api.ramphub.io/api/developer/orders" \
  -H "x-api-key: rh_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "side": "sell",
    "amount": 10,
    "fiatCurrency": "NGN",
    "asset": "USDT",
    "chain": "base",
    "bankCode": "100004",
    "bankName": "Opay",
    "accountNumber": "1234567890",
    "accountName": "ACCOUNT HOLDER NAME",
    "email": "user@example.com",
    "externalCustomerId": "cust_7f3b8a2d",
    "developerFeePercent": 0.5
  }'
```

If you do not already have the account holder name, call `POST /api/developer/bank-accounts/resolve` first and reuse the returned `accountName`.

## Response shape

The response includes the tracked RampHub transaction id, the selected provider, and the provider settlement details your app should show next.

Common fields:

* `transactionId`
* `requestReference`
* `side`
* `asset`
* `chain`
* `selectedProvider`
* `bestRateUsed`
* `providerDetails`
* `ourCryptoAddress`
* `environment`
* `sandbox`
* `trackable`

```json theme={null}
{
  "transactionId": "0d4b7fb0-66f7-4a52-9183-7c3fe44f0db2",
  "requestReference": "RH-TX-AB12CD34",
  "side": "sell",
  "asset": "USDT",
  "chain": "base",
  "selectedProvider": "UseBread",
  "bestRateUsed": 1397.17,
  "providerDetails": {
    "status": "AWAITING_PAYMENT"
  },
  "ourCryptoAddress": "0xProviderDepositAddress",
  "environment": "live",
  "sandbox": false,
  "trackable": true
}
```

## Rules

* Save `transactionId` right away.
* Use `providerDetails` for the next step.
* Use `ourCryptoAddress` for sell payment instructions when it is present.
