NGNC Bridge
Search
K
Comment on page

Get Transactions

Get all transactions on both test and live mode

Use this endpoint to perform a fetch transaction.
Shell
JavaScript
Python
Ruby
PHP
Swift
Kotlin
1
curl --request GET\
2
--url https://api.ngnc.online/transactions/v1/get_all_transactions?business_id=BUS_ID\
3
--header 'accept: application/json' \
4
--header 'content-type: application/json' \
5
--header 'ngnc-sec-key: NGNC_SECRET_KEY' \
1
const options = {
2
method: 'GET',
3
headers: {
4
accept: 'application/json',
5
'ngnc-sec-key': 'NGNC_SECRET_KEY',
6
'content-type': 'application/json'
7
},
8
};
9
10
let bus_id = "string"
11
fetch(`https://api.ngnc.online/transactions/v1/get_all_transactions?business_id=${bus_id}`, options)
12
.then(response => response.json())
13
.then(response => console.log(response))
14
.catch(err => console.error(err));
python -m pip install requests
1
2
import requests
3
bus_id = "string"
4
url = `https://api.ngnc.online/transactions/v1/get_all_transactions?business_id=${bus_id }`
5
6
headers = {
7
"accept": "application/json",
8
"ngnc-sec-key": "NGNC_SECRET_KEY",
9
"content-type": "application/json"
10
}
11
12
response = requests.post(url, headers=headers)
13
14
print(response.text)
1
require 'uri'
2
require 'net/http'
3
require 'openssl'
4
5
url = URI("https://api.ngnc.online/transactions/v1/get_all_transactions?business_id=string")
6
7
http = Net::HTTP.new(url.host, url.port)
8
http.use_ssl = true
9
10
request = Net::HTTP::Get.new(url)
11
request["accept"] = 'application/json'
12
request["ngnc-sec-key"] = 'NGNC_SECRET_KEY'
13
request["content-type"] = 'application/json'
14
15
response = http.request(request)
16
puts response.read_body
1
<?php
2
require_once('vendor/autoload.php');
3
4
$client = new \GuzzleHttp\Client();
5
6
$response = $client->request('GET', 'https://api.ngnc.online/transactions/v1/get_all_transactions?business_id=string', [
7
'headers' => [
8
'accept' => 'application/json',
9
'content-type' => 'application/json',
10
'ngnc-sec-key' => 'NGNC_SECRET_KEY',
11
],
12
]);
13
14
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
9
10
let postData = JSONSerialization.data( options: [])
11
12
let request = NSMutableURLRequest(url: NSURL(string: "https://api.ngnc.online/transactions/v1/get_all_transactions?business_id=BUS_ID")! as URL,
13
cachePolicy: .useProtocolCachePolicy,
14
timeoutInterval: 10.0)
15
request.httpMethod = "GET"
16
request.allHTTPHeaderFields = headers
17
18
let session = URLSession.shared
19
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
20
if (error != nil) {
21
print(error as Any)
22
} else {
23
let httpResponse = response as? HTTPURLResponse
24
print(httpResponse)
25
}
26
})
27
28
dataTask.resume()
1
val client = OkHttpClient()
2
3
val mediaType = MediaType.parse("application/json")
4
5
require 'net/http'
6
require 'openssl'
7
8
url = URI("https://api.ngnc.online/transactions/v1/get_all_transactions?business_id=BUS_ID")
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
18
response = http.request(request)
19
puts response.read_bod\":\"string\"}")
20
val request = Request.Builder()
21
.url("https://api.ngnc.online/transactions/v1/get_all_transactions?business_id=BUS_ID")
22
.get()
23
.addHeader("accept", "application/json")
24
.addHeader("ngnc-sec-key", "NGNC_SECRET_KEY")
25
.addHeader("content-type", "application/json")
26
.build()
27
28
val response = client.newCall(request).execute()
get
https://api.ngnc.online/transactions/v1/get_all_transactions
Fetch all transactions on live or test mode