---
description: This endpoint can be used to intiate an NGNC Off-ramp transaction.
---

# Sell Ramp

## Initiate a Sell Transaction.

{% hint style="info" %}
Use this endpoint to perform a sell transaction\
\
**POST** **api.ngnc.online/transactions/v1/offramp**
{% endhint %}

{% tabs %}
{% tab title="Shell" %}
{% code overflow="wrap" lineNumbers="true" %}
```bash
curl --request POST \
     --url https://api.ngnc.online/transactions/v1/offramp \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'ngnc-sec-key: NGNC_SECRET_KEY' \
     --data '
{
    "business_id": "string",  
    "link_tag": "string", 
    "type": "string", 
    "amount": 0,  
    "account_name": "string", 
    "account_number": "string", 
    "bank_name": "string", 
}'
```
{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code overflow="wrap" lineNumbers="true" %}
```javascript
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'ngnc-sec-key': 'NGNC_SECRET_KEY',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    "business_id": "string",  
    "link_tag": "string", 
    "type": "string", 
    "amount": 0,  
    "account_name": "string", 
    "account_number": "string", 
    "bank_name": "string", 
    "network": "string",
    "wallet_address": "string"
  });
};

fetch('https://api.ngnc.online/transactions/v1/offramp', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
```
{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code title="python -m pip install requests" overflow="wrap" lineNumbers="true" %}
```python
import requests

url = "https://api.ngnc.online/transactions/v1/offramp"

payload = {
    "business_id": "string",  
    "link_tag": "string", 
    "type": "string", 
    "amount": 0,  
    "account_name": "string", 
    "account_number": "string", 
    "bank_name": "string", 
    "network": "string",
    "wallet_address": "string"
}
headers = {
    "accept": "application/json",
    "ngnc-sec-key": "NGNC_SECRET_KEY",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```
{% endcode %}
{% endtab %}
{% endtabs %}

<table><thead><tr><th width="189">Parameter</th><th>Type</th><th width="305">Description</th><th>Required</th></tr></thead><tbody><tr><td>business_id</td><td>String</td><td>Buinesses unique ID which can be found on the dashboard at <a href="https://app.ngnc.online/">app.ngnc.online</a>.</td><td>True</td></tr><tr><td>link_tag</td><td>String</td><td>Your business link_tag.<br>Also provided on your dashbaord.</td><td>True</td></tr><tr><td>type</td><td>String</td><td>sell_ramp</td><td>True</td></tr><tr><td>amount</td><td>String</td><td>Amount user wishes to off-ramp and send to nigerian account. (Min 20 USDT / USDC)</td><td>True</td></tr><tr><td>account_name</td><td>String</td><td>Bank account name to deposit funds in Nigeria.</td><td>True</td></tr><tr><td>account_number</td><td>String</td><td>10 Digits Bank account number to deposit funds in Nigeria.</td><td>True</td></tr><tr><td>bank_name</td><td>String</td><td>Use the <a href="broken-reference">List Banks</a> ENDPOINT to fetch the list of supported payment banks.<br><strong>Only the name needs to be passed</strong></td><td>True</td></tr></tbody></table>

{% code overflow="wrap" lineNumbers="true" %}
```javascript
// Sample Sell Request in Javascript

const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'ngnc-sec-key': 'NGNC_SECRET_KEY',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    "business_id": "560520123",  
    "link_tag": "Link_Eng", 
    "type": "sell_ramp", 
    "amount": 1000,  
    "account_name": "Jane Doe", 
    "account_number": "3330484773", 
    "bank_name": "Wema bank", 
  });
};

fetch('https://api.ngnc.online/transactions/v1/offramp', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
```
{% endcode %}

## Off Ramp NGNC

<mark style="color:green;">`POST`</mark> `https://api.ngnc.online/transactions/v1/offramp`&#x20;

#### Headers

| Name                                           | Type   | Description             |
| ---------------------------------------------- | ------ | ----------------------- |
| ngnc-sec-key<mark style="color:red;">\*</mark> | String | Get Key from Bridge App |

#### Request Body

| Name                                              | Type   | Description                          |
| ------------------------------------------------- | ------ | ------------------------------------ |
| business\_id<mark style="color:red;">\*</mark>    | String | Get your business id from Bridge App |
| account\_name<mark style="color:red;">\*</mark>   | String |                                      |
| link\_tag<mark style="color:red;">\*</mark>       | String |                                      |
| amount<mark style="color:red;">\*</mark>          | Number |                                      |
| type<mark style="color:red;">\*</mark>            | String | use: sell\_ramp                      |
| wallet\_address<mark style="color:red;">\*</mark> | String |                                      |
| network<mark style="color:red;">\*</mark>         | String |                                      |
| bank\_name<mark style="color:red;">\*</mark>      | String |                                      |
| account\_number<mark style="color:red;">\*</mark> | String |                                      |

{% tabs %}
{% tab title="200: OK Returns the successful transaction data" %}
```json
{
    "status": "success",
    "message": "Transaction Request successful",
    "transaction": {
        "transaction_id": "645c31fdedd472fb04b3be53",
        "business": {
            "business_id": "0123456789"
        },
        "type": "Sell",
        "reference": "64125118694",
        "amount": 102094,
        "account_name": "Tansi Jones",
        "account_number": "9480948372",
        "bank_name": "Wema bank",
        "link_tag": "Link_eng",
        "date_created": "May 11, 2023"
    }
}
```
{% endtab %}

{% tab title="401: Unauthorized This happens when you enter a wrong key" %}

{% endtab %}

{% tab title="404: Not Found This happens when you you use a wrong or broken url" %}

{% endtab %}
{% endtabs %}
