Comment on page
Sell NGNC
This endpoint can be used to intiate an NGNC Off-ramp transaction.
Use this endpoint to perform a sell transaction
POST
api.ngnc.online/transactions/v1/offrampShell
JavaScript
Python
Ruby
PHP
Swift
Kotlin
1
curl --request POST \
2
--url https://api.ngnc.online/transactions/v1/offramp \
3
--header 'accept: application/json' \
4
--header 'content-type: application/json' \
5
--header 'ngnc-sec-key: NGNC_SECRET_KEY' \
6
--data '
7
{
8
"business_id": "string",
9
"link_tag": "string",
10
"type": "string",
11
"amount": 0,
12
"account_name": "string",
13
"account_number": "string",
14
"bank_name": "string",
15
"network": "string",
16
"wallet_address": "string"
17
}'
1
const options = {
2
method: 'POST',
3
headers: {
4
accept: 'application/json',
5
'ngnc-sec-key': 'NGNC_SECRET_KEY',
6
'content-type': 'application/json'
7
},
8
body: JSON.stringify({
9
"business_id": "string",
10
"link_tag": "string",
11
"type": "string",
12
"amount": 0,
13
"account_name": "string",
14
"account_number": "string",
15
"bank_name": "string",
16
"network": "string",
17
"wallet_address": "string"
18
});
19
};
20
21
fetch('https://api.ngnc.online/transactions/v1/offramp', options)
22
.then(response => response.json())
23
.then(response => console.log(response))
24
.catch(err => console.error(err));
python -m pip install requests
1
2
import requests
3
4
url = "https://api.ngnc.online/transactions/v1/offramp"
5
6
payload = {
7
"business_id": "string",
8
"link_tag": "string",
9
"type": "string",
10
"amount": 0,
11
"account_name": "string",
12
"account_number": "string",
13
"bank_name": "string",
14
"network": "string",
15
"wallet_address": "string"
16
}
17
headers = {
18
"accept": "application/json",
19
"ngnc-sec-key": "NGNC_SECRET_KEY",
20
"content-type": "application/json"
21
}
22
23
response = requests.post(url, json=payload, headers=headers)
24
25
print(response.text)
1
require 'uri'
2
require 'net/http'
3
require 'openssl'
4
5
url = URI("https://api.ngnc.online/transactions/v1/offramp")
6
7
http = Net::HTTP.new(url.host, url.port)
8
http.use_ssl = true
9
10
request = Net::HTTP::Post.new(url)
11
request["accept"] = 'application/json'
12
request["ngnc-sec-key"] = 'NGNC_SECRET_KEY'
13
request["content-type"] = 'application/json'
14
request.body = "{\"business_id\":\"string\",\"link_tag\":\"string\",\"amount\":0,\"type\":\"string\",\"account_name\":\"string\",\"account_name\":\"string\",\"account_number\":\"string\",\"bank_name\":\"string\",\"network\":\"string\",\"wallet_address\":\"string\"}"
15
16
response = http.request(request)
17
puts response.read_body
1
<?php
2
require_once('vendor/autoload.php');
3
4
$client = new \GuzzleHttp\Client();
5
6
$response = $client->request('POST', 'https://api.ngnc.online/transactions/v1/offramp', [
7
'body' => '{
8
"business_id": "string",
9
"link_tag": "string",
10
"type": "string",
11
"amount": 0,
12
"account_name": "string",
13
"account_number": "string",
14
"bank_name": "string",
15
"network": "string",
16
"wallet_address": "string"
17
}',
18
'headers' => [
19
'accept' => 'application/json',
20
'content-type' => 'application/json',
21
'ngnc-sec-key' => 'NGNC_SECRET_KEY',
22
],
23
]);
24
25
echo $response->getBody();
1
import Foundation
2
3
let headers = [
4
"accept": "application/json",
5
"ngnc-sec-key": "NGNC_SECRET_KEY",
6
"content-type": "application/json"
7
]
8
let parameters = [
9
"business_id": "string",
10
"link_tag": "string",
11
"type": "string",
12
"amount": 0,
13
"account_name": "string",
14
"account_number": "string",
15
"bank_name": "string",
16
"network": "string",
17
"wallet_address": "string"
18
] as [String : Any]
19
20
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
21
22
let request = NSMutableURLRequest(url: NSURL(string: "https://api.ngnc.online/transactions/v1/offramp")! as URL,
23
cachePolicy: .useProtocolCachePolicy,
24
timeoutInterval: 10.0)
25
request.httpMethod = "POST"
26
request.allHTTPHeaderFields = headers
27
request.httpBody = postData as Data
28
29
let session = URLSession.shared
30
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
31
if (error != nil) {
32
print(error as Any)
33
} else {
34
let httpResponse = response as? HTTPURLResponse
35
print(httpResponse)
36
}
37
})
38
39
dataTask.resume()
1
val client = OkHttpClient()
2
3
val mediaType = MediaType.parse("application/json")
4
val body = RequestBody.create(mediaType, "{\"business_id\":\"string\",\"link_tag\":\"string\",\"amount\":0,\"type\":\"string\",\"account_name\":\"string\",\"account_name\":\"string\",\"account_number\":\"string\",\"bank_name\":\"string\",\"network\":\"string\",\"wallet_address\":\"string\"}")
5
require 'net/http'
6
require 'openssl'
7
8
url = URI("https://api.ngnc.online/transactions/v1/offramp")
9
10
http = Net::HTTP.new(url.host, url.port)
11
http.use_ssl = true
12
13
request = Net::HTTP::Post.new(url)
14
request["accept"] = 'application/json'
15
request["ngnc-sec-key"] = 'NGNC_SECRET_KEY'
16
request["content-type"] = 'application/json'
17
request.body = "{\"business_id\":\"string\",\"link_tag\":\"string\",\"amount\":0,\"type\":\"string\",\"account_name\":\"string\",\"account_name\":\"string\",\"account_number\":\"string\",\"bank_name\":\"string\",\"network\":\"string\",\"wallet_address\":\"string\"}"
18
19
response = http.request(request)
20
puts response.read_bod\":\"string\"}")
21
val request = Request.Builder()
22
.url("https://api.ngnc.online/transactions/v1/offramp")
23
.post(body)
24
.addHeader("accept", "application/json")
25
.addHeader("ngnc-sec-key", "NGNC_SECRET_KEY")
26
.addHeader("content-type", "application/json")
27
.build()
28
29
val response = client.newCall(request).execute()
Parameter | Type | Description | Required |
---|---|---|---|
business_id | String | True | |
link_tag | String | Business link_tag.
| True |
type | String | sell_ramp | True |
amount | String | Amount user wishes to offramp and send to nigerian account. (Min 20 USDT / USDC) | True |
account_name | String | Bank account name to deposit funds in Nigeria | True |
account_number | String | Bank account number to deposit funds in Nigeria | True |
bank_name | String | Use the List Banks ENDPOINT to fetch the list of supported payment banks.
Only the name needs to be passed | True |
// 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",
"network": "stellar",
"wallet_address": "GHEJ943JW94JWHU4389MWE"
});
};
fetch('https://api.ngnc.online/transactions/v1/offramp', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
post
https://api.ngnc.online/transactions/v1/offramp
Off Ramp NGNC
Last modified 6mo ago