> For the complete documentation index, see [llms.txt](https://docs.onramp.money/onramp-whitelabel-unlisted/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onramp.money/onramp-whitelabel-unlisted/whitelabel-offramp-endpoints/create-transaction.md).

# Create transaction

Creates an offramp transaction

This endpoint will create an offramp transaction and returns transactionId and deposit address

{% hint style="info" %}
**Note:**

* **Supported Currencies**: To view the list of all the fiat currencies supported by Onramp, click [here](https://docs.onramp.money/onramp/supported-assets-and-fiat/fiat-currencies).
  {% endhint %}

## Create an Offramp transaction.

<mark style="color:green;">`POST`</mark> `https://api.onramp.money/onramp/api/v2/whiteLabel/offramp/createTransaction`

#### Request Body

| Name                                            | Type   | Description                                                                                                                             |         |         |                           |                                                |             |
| ----------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------- | ------------------------- | ---------------------------------------------- | ----------- |
| fromCurrency<mark style="color:red;">\*</mark>  | String | <p>Base currency of the trading pair <br><strong>E.g.</strong> of fromCurrency:</p><p>usdc                                              | usdt    | eth</p> |                           |                                                |             |
| toCurrency<mark style="color:red;">\*</mark>    | String | <p>Quote currency of the trading pair</p><p><strong>E.g.</strong> of toCurrency: <br>INR                                                | TRY     | AED     | MXN                       | IDR</p>                                        |             |
| chain<mark style="color:red;">\*</mark>         | String | <p>supported networks by onramp for onchain transactions </p><p></p><p><strong>E.g.</strong> of supported networks: </p><p>usdt - bep20 | matic20 | erc20   | trc20 </p><p>usdc - bep20 | matic20 </p><p>busd - bep20 </p><p>eth - erc20 | matic20</p> |
| fiatAccountId<mark style="color:red;">\*</mark> | String | Unique ID of fiat account to withdraw off-ramped fiat to                                                                                |         |         |                           |                                                |             |
| customerId<mark style="color:red;">\*</mark>    | String | Unique id received from /kyc/url                                                                                                        |         |         |                           |                                                |             |
| fromAmount<mark style="color:red;">\*</mark>    | String | Actual Crypto quantity to be sold.                                                                                                      |         |         |                           |                                                |             |
| toAmount<mark style="color:red;">\*</mark>      | String | An estimate of fiat amount user will receive                                                                                            |         |         |                           |                                                |             |
| rate<mark style="color:red;">\*</mark>          | String | expected price estimate                                                                                                                 |         |         |                           |                                                |             |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
      "status": 1,
      "code": 200,
      "data": {
        "transactionId": "76440",
        "createdAt": "2023-06-01T00:02:21.000Z",
        "depositAddress": {
          "address": "0xf18d064ec3ab7b9e900e4daa89798d29e8b4eab5",
          "chain": "ETH"
        },
        "expiresAt": "2023-06-01T03:02:21.000Z"
      }
}
```

{% endtab %}

{% tab title="400: Bad Request Missing required parameter(s)" %}

```json
{
    "status": 0,
    "code": 400,
    "error": "Missing parameter -> customerId, fromCurrency, toCurrency, fromAmount, toAmount, rate, fiatAccountId, chain."
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal Server Error" %}

```json
{
    "status": 0,
    "code": 500,
    "error": "Unable to create Offramp transaction at the moment. Please try again after some time."
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Response" %}

```json
{
      "status": 1,
      "code": 200,
      "data": {
        "transactionId": "76440",
        "createdAt": "2023-06-01T00:02:21.000Z",
        "depositAddress": {
          "address": "0xf18d064ec3ab7b9e900e4daa89798d29e8b4eab5",
          "chain": "ETH"
        },
        "expiresAt": "2023-06-01T03:02:21.000Z"
      }
}
```

{% endtab %}

{% tab title="Explanation" %}

* status -> 0 is for unsuccessful request, 1 is for a successful one
* transactionId -> unique identifier of the transaction
* createdAt -> time at which the transaction was created.
* depositAddress -> Deposit Address to send crypto to&#x20;
* chain -> denotes which chain the coin was sent on (e.g. MATIC20).&#x20;
* expiresAt -> denotes the order expiry time **(if crypto is sent after this time, can only be resolved via ticket)**
  {% endtab %}
  {% endtabs %}
