Check Source
Check the source
Last updated
Check the source
Last updated
With this request, you should check the callback source and make sure it comes from FCF Pay.
You will receive theunique_id
in the .
curl --location --request POST 'https://merchant.fcfpay.com/api/v1/check-source' \
--header 'Authorization: Bearer YOUR_LIVE_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"unique_id": "0x9cf24f76778e517511f6178f114a1d3e95e3c7fdbfcbe52a961b6d748e860849_0"
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer YOUR_LIVE_API_KEY");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"unique_id": "0x9cf24f76778e517511f6178f114a1d3e95e3c7fdbfcbe52a961b6d748e860849_0"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://merchant.fcfpay.com/api/v1/check-source", 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://merchant.fcfpay.com/api/v1/check-source',
'headers': {
'Authorization': 'Bearer ',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"unique_id": "0x9cf24f76778e517511f6178f114a1d3e95e3c7fdbfcbe52a961b6d748e860849_0"
})
};
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://merchant.fcfpay.com/api/v1/check-source',
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 =>'{
"unique_id": "0x9cf24f76778e517511f6178f114a1d3e95e3c7fdbfcbe52a961b6d748e860849_0"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
unique_id
The unique id you mus get from deposit callback
import requests
import json
url = "https://merchant.fcfpay.com/api/v1/check-source"
payload = json.dumps({
"unique_id": "0x9cf24f76778e517511f6178f114a1d3e95e3c7fdbfcbe52a961b6d748e860849_0"
})
headers = {
'Authorization': 'Bearer YOUR_LIVE_API_KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
POST
https://merchant.fcfpay.com/api/v1/check-source
Authorization*
String
Bearer {{API_KEY}}
unique_id
string
Got from deposit callback request
{
"success": true,
"data": {
"unique_id": "0x9cf24f76778e517511f6178f114a1d3e95e3c7fdbfcbe52a961b6d748e860849_0"
},
"message": "Transaction exists."
}
{
"success": false,
"data": [],
"message": "Merchant Authentication problem!"
}
{
"success": false,
"data": {
"test": "test"
},
"message": "The given data was invalid!",
"errors": {
"unique_id": [
"The unique id field is required."
]
}
}
{
"success": false,
"data": {
"unique_id": "0x9cf24f76778e517511f6178f114a1d3e95e3c7fdbfcbe52a961b6d748e860849_0"
},
"message": "Transaction does not exist!"
}