Check Order
Get order information
After creating the order you can make a "check-order" request to check if the order was paid or not. You will receive all payments details in a list.
curl --location --request POST 'https://sandbox.fcfpay.com/api/v2/check-order' \
--header 'Authorization: Bearer YOUR_SANDBOX_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"order_id": "Test123"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer \"YOUR_SANDBOX_API_KEY\"");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"order_id": "Test123"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://sandbox.fcfpay.com/api/v2/check-order", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://sandbox.fcfpay.com/api/v2/check-order',
'headers': {
'Authorization': 'Bearer "YOUR_SANDBOX_API_KEY"',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"order_id": "Test123"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.fcfpay.com/api/v2/check-order',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"order_id": "Test123"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer "YOUR_SANDBOX_API_KEY"',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
import json
url = "https://sandbox.fcfpay.com/api/v2/check-order"
payload = json.dumps({
"order_id": "Test123"
})
headers = {
'Authorization': 'Bearer "YOUR_SANDBOX_API_KEY"',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Check Order
POST
https://merchant.fcfpay.com/api/v2/check-order
Query Parameters
Name
Type
Description
order_id*
string
The Order ID you want to check
{
"success": true,
"data": {
"order_id": "3x101",
"user_id": "1",
"txs": [],
"order_amount": "10.00",
"total_fiat_amount": "",
"fiat_currency": "USD"
},
"message": "Successfully fetched."
}
{
"success": true,
"data": {
"order_id": "Test123",
"user_id": "1",
"order_amount": "100.00",
"total_fiat_amount": "32.92",
"fiat_currency": "EUR",
"txs": [
{
"deposited": true,
"txid": "0x278859d371bd6084963db80ba066fc891fe006047b0dc5c4929efff35918052c",
"confirm_blocks": 24,
"status": "deposited",
"amount_usd": "33.89",
"fiat_amount": "32.92",
"fiat_currency": "EUR",
"amount": "150000000000000000",
"currency": "BSC",
"fees": "210000000000000",
"decimal": 18,
"fee_decimal": 18,
"date": "Jul 05 2022 12:24:44"
}
]
},
"message": "Successfully fetched."
}
{
"success": true,
"data": {
"order_id": "Test123",
"user_id": "1",
"order_amount": "100.00",
"total_fiat_amount": "54.75",
"fiat_currency": "EUR",
"txs": [
{
"deposited": true,
"txid": "0x278859d371bd6084963db80ba066fc891fe006047b0dc5c4929efff35918052c",
"confirm_blocks": 24,
"status": "deposited",
"amount_usd": "33.89",
"fiat_amount": "33.10",
"fiat_currency": "EUR",
"amount": "150000000000000000",
"currency": "BSC",
"fees": "210000000000000",
"decimal": 18,
"fee_decimal": 18,
"date": "Jul 05 2022 03:02:35"
},
{
"deposited": true,
"txid": "0x2d54bfbfaf5fcd36a3ebb2400809b08d72defce9f121b3d30cb0bad57d23377c",
"confirm_blocks": 22,
"status": "deposited",
"amount_usd": "22.47",
"fiat_amount": "21.94",
"fiat_currency": "EUR",
"amount": "100000000000000000",
"currency": "BSC",
"fees": "210000000000000",
"decimal": 18,
"fee_decimal": 18,
"date": "Jul 05 2022 03:02:35"
}
]
},
"message": "Successfully fetched."
}
{
"success": false,
"message": "",
"data": "Order does not exists"
}
Last updated