API

System status request getstatus

To check the health of the system, you need to send a get request for the following to the address https: // < endpoint > / v3 / getstatus, be sure to send to header of the merchant's key in the x-key parameter. The response will be the result in json format

Example of a status request for php

$curl=curl_init(); curl_setopt_array($curl,array(CURLOPT_URL=>'https:// < endpoint > /v3/getstatus',
CURLOPT_RETURNTRANSFER=>true,CURLOPT_ENCODING=>'',
CURLOPT_MAXREDIRS=>10,CURLOPT_TIMEOUT=>0,
CURLOPT_FOLLOWLOCATION=>true,
CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST=>'GET',
CURLOPT_HTTPHEADER=>array('x-key:<merchant key>','Content-Type:application/json'),));
$response=curl_exec($curl);curl_close($curl);
echo$response;

Responce:

{"message":"OK"}

Request to receive merchant addresses

To get the addresses of the merchant in the system, you need to send a get request to https://<endpoint>/v3/getwallet

An example of a request to get wallet addresses in php

$curl=curl_init();
curl_setopt_array($curl,array(CURLOPT_URL=>'https://<endpoint>/v3/getwallet',
CURLOPT_RETURNTRANSFER=>true,CURLOPT_ENCODING=>'',
CURLOPT_MAXREDIRS=>10,CURLOPT_TIMEOUT=>0,CURLOPT_FOLLOWLOCATION=>true,
CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST=>'GET',
CURLOPT_HTTPHEADER=>array('x-key:<merchant key>,
'Content-Type:application/json'),));
$response=curl_exec($curl);
curl_close($curl);
echo$response;

Responce:

{
"wallets":[{"type":"BTC","addr":"xxxxxxxxxxxxxxxxxxxxx"},
{"type":"ETH","addr":" xxxxxxxxxxxxxxxxxxxxx"},
{"type":"USDT","addr":" xxxxxxxxxxxxxxxxxxxxx"}],
"account":["XXXXXXXXXXXXXXXXXX"],
"card":["XXXXXXXXXXXXXXXXXX"]
}

Where wallets have addresses for making automatic payments cryptocurrency, account contains IBAN details of the system user, card numbers of cards merchant in the system

Request to get available payment methods currencies

To receive available methods of receiving payment, you must send a request to https://<endpoint>/v3/currencies

An example of a request to get addresses in php

$curl=curl_init();
curl_setopt_array($curl,array(CURLOPT_URL=>'https://<endpoint>/v3/currencies',
CURLOPT_RETURNTRANSFER=>true,CURLOPT_ENCODING=>'',
CURLOPT_MAXREDIRS=>10,CURLOPT_TIMEOUT=>0,
CURLOPT_FOLLOWLOCATION=>true,
CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST=>'GET',
CURLOPT_HTTPHEADER=>array('x-key:<merchant key>,'Content-Type:application/json'),));
$response=curl_exec($curl);
curl_close($curl);
echo$response;

Responce:

{"currencies":"[array of available methods]"}

These names of the methods must be used when making a payment.

Receive the minimum payment amount qoutelimit

To receive the minimum payment amount, you must send a get request to the address https://<endpoint>/v3/qoutelimit with parameter currency_from=<input method>

All methods are cryptocurrency input methods, except for the basic ones specified in the method getwallet(btc,eth,usdt) will be fixed to usdterc20. Fiat methods will fixed in accordance with the currency of input.

An example of a request to get the minimum payment amount in php

$curl=curl_init();
curl_setopt_array($curl,
array(CURLOPT_URL=>'https://<endpoint>/v3/qoutelimit?currency_from=btc',
CURLOPT_RETURNTRANSFER=>true,
CURLOPT_ENCODING=>'',
CURLOPT_MAXREDIRS=>10,
CURLOPT_TIMEOUT=>0,
CURLOPT_FOLLOWLOCATION=>true,
CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST=>'GET',
CURLOPT_HTTPHEADER=>array('x-key:<merchant key>','Content-Type:application/json'),));
$response=curl_exec($curl);curl_close($curl);
echo$response;

Responce:

{"currency_from":"btc", "currency_to":"usdt", "min_amount":"0.0002625"}

Payment request createorder

To receive the user's top-up address, you need to send a post request to the address https://<endpoint>/v3/createorder with the following parameters:

'first_name'=>'first name',
'last_name'=>'last name',
'address'=>'address',
'orderid'=>'order id',
'country'=>'country (letter designation e.g. UK)',
'state'=>'region',
'city'=>'city',
'zip'=>'zip (postcode)',
'ip_address'=>'user ip address',
'birth_date'=>'date of birth in the format 12/10/1986',
'email'=>'user mail',
'phone_no'=>'phone number in the format +34343434343',
'amount'=>'amount',
'currency'=>'currency'

If the input method contains fiat methods eur, usd, uah, rub or wire, then you need to transfer all values, if cryptocurrency is used as an input method, then it is necessary specify only email, order number, payer and address, amount and currency.

An example of a request to get the address of a recharge or a payment form in php

$curl=curl_init();
curl_setopt_array($curl,
array(CURLOPT_URL=>'https://<endpoint>/v3/qoutelimit?currency_from=btc',
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=>array('first_name'=>'test',
'last_name'=>'test',
'address'=>'12street',
'orderid'=>'1',
'country'=>'UK',
'state'=>'london',
'city'=>'london',
'zip'=>'01002',
'ip_address'=>'192.168.0.1',
'birth_date'=>'12/10/1986',
'email'=>'[email protected]',
'phone_no'=>'+34343434343',
'amount'=>'100','currency'=>'usd'),
CURLOPT_HTTPHEADER=>array('x-key:<merchant key>,'Content-Type:application/json'),));
$response=curl_exec($curl);
curl_close($curl);
echo$response;

Responce:

{"addr":"ХХХХХХХХХХХХ....", "amount":"80", "currency":"usd"}

The addr field contains either a temporary address for a crypto transaction or a link to the generated payment form.

Request to getting status

To get the user's top-up address, you need to send a post request to the address https://<endpoint>/v3/status?orderid=<id payment in your system>

Example request for receiving the address of replenishment or payment form in php

$curl=curl_init();
curl_setopt_array($curl,
array(CURLOPT_URL=>'https://<endpoint>/v3/status?orderid=12',
CURLOPT_RETURNTRANSFER=>true,CURLOPT_ENCODING=>'',
CURLOPT_MAXREDIRS=>10,CURLOPT_TIMEOUT=>0,
CURLOPT_FOLLOWLOCATION=>true,
CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST=>'GET',
CURLOPT_HTTPHEADER=>array('x-key:<merchant key>,'Content-Type:application/json'),));
$response=curl_exec($curl);
curl_close($curl);
echo$response;

Responce:

{"message":"waiting"}

Payment statuses can be as follows

"waiting" payment has been generated but not paid
"confirming"
"confirmed"
"sending"
"partially_paid" partially paid
"finished" payment paid to the merchant or success
"failed" payment error or decline
"refunded" payment refunded
"expired" the temporary address for the payment has expired

Payment confirmation processor

If the payment is successful or unsuccessful, the data on the payment by the POST method, signed with the merchant's key, is sent to the CallbackUrl store server:

orderid - payment id

status – payment status

time – time of payment in UTC

sign-signature with the merchant's key

Example:

array('orderid '=>’1’,
'status'=>’CLOSE’,
'time'=>’1581420915853’,
'sign'=>’pQQgUBfjz+XxRSpwo5srmw==’)

Payment confirmation data signature

When a request is received on the callback url, it is necessary to verify its signature as authenticity, and to carry out actions to credit the balance solely based on it. To verify the signature, you must:

1. All received fields are sorted sorted alphabetically.

2. In the beginning to add the secret key of the merchant.

3. Concatenation of all fields goes through the symbol":" .

4. The resulting string is hashed using the sha-1 method.