Verify a Transaction
To make this request, send an authenticated request to the verify endpoint.
post
https://api.1app.online/v1/business/verifytrans
Verify a transaction
Take a look at how you might do this:
cURL
NodeJs
PHP - cURL
Python
1
curl --location --request POST 'https://api.1app.online/v1/business/verifytrans' \
2
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
3
--form 'reference="634967hg599287"'
Copied!
1
var https = require('follow-redirects').https;
2
var fs = require('fs');
3
4
var options = {
5
'method': 'POST',
6
'hostname': 'api.1app.online',
7
'path': '/v1/business/verifytrans',
8
'headers': {
9
'Authorization': 'Bearer YOUR_SECRET_KEY'
10
},
11
'maxRedirects': 20
12
};
13
14
var req = https.request(options, function (res) {
15
var chunks = [];
16
17
res.on("data", function (chunk) {
18
chunks.push(chunk);
19
});
20
21
res.on("end", function (chunk) {
22
var body = Buffer.concat(chunks);
23
console.log(body.toString());
24
});
25
26
res.on("error", function (error) {
27
console.error(error);
28
});
29
});
30
31
var postData = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"reference\"\r\n\r\n634967hg599287\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--";
32
33
req.setHeader('content-type', 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
34
35
req.write(postData);
36
37
req.end();
Copied!
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://api.1app.online/v1/business/verifytrans',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS => array('reference' => '634967hg599287'),
15
CURLOPT_HTTPHEADER => array(
16
'Authorization: Bearer YOUR_SECRET_KEY'
17
),
18
));
19
20
$response = curl_exec($curl);
21
22
curl_close($curl);
23
echo $response;
24
Copied!
1
import requests
2
3
url = "https://api.1app.online/v1/business/verifytrans"
4
5
payload={'reference': '634967hg599287'}
6
files=[
7
8
]
9
headers = {
10
'Authorization': 'Bearer YOUR_SECRET_KEY'
11
}
12
13
response = requests.request("POST", url, headers=headers, data=payload, files=files)
14
15
print(response.text)
16
Copied!

Sample response

1
{
2
"status": true,
3
"message": "Successful",
4
"reference": ""
5
"data": [
6
{
7
"ownerid": "1",
8
"amount": "150000.00",
9
"charged_amount": "150000.00",
10
"currency": "NGN",
11
"reference": "63490b1f59287",
12
"customer_reference": "2913_1643371498",
13
"transaction_token": "c31f54f3b7986a92d04d1699f51227b3",
14
"customer_email": "[email protected]",
15
"customer_name": "",
16
"payment_channel": "paystack",
17
"paid_through": "api",
18
"payment_time": "28 Jan 2022 01:04"
19
}
20
]
21
}
Copied!