Cryptocurrency payouts to a personal Qostiq wallet
Crypto transfer — This method allows you to make cryptocurrency payouts from the shop's cryptocurrency balance to a personal Qostiq wallet.
Preliminary calculation of payout to Qostiq wallet [/crypto/transfer/try]
URL: https://core.qostiq.com/crypto/transfer/try
Method: POST
Mandatory parameters: amount, amount_type, now, payer_currency, shop_currency, shop_id
This request is not mandatory to create a payout to the Qostiq cryptocurrency wallet. The request clarifies the possibility of creating a payout with the specified parameters, returns the amounts debited from the store and received to the recipient's wallet after calculating the commission or conversion.
Example request:
{
"amount": 10,
"amount_type": "writeoff_amount",
"now": 1691400155,
"payee_currency": "TRX",
"shop_currency": "TRX",
"shop_id": 6,
"sign": "e77dc50d3e4bc3b307924aaefeab1887d38e1aa0d73ba17a2bdad99893b984e6"
}
Where,
| Parameter | Description | Format | Example |
|---|---|---|---|
amount | payout amount | String or number, see "Specifying the operation amount" for details | "1.00000001" or 1.00000001 |
amount_type | indicates the amount type, possible values: receive_amount — amount to be received to the wallet in payer_currency currency, writeoff_amount — amount to be written off the shop balance in shop_currency currency | String | "receive_amount" or "writeoff_amount" |
now | request time, in unixtimestamp format | Integer | 1691400155 |
payer_currency | currency of receiving funds to the client's wallet | String | "TRX" |
shop_currency | currency of funds written off the shop balance | String | "TRX" |
shop_id | shop identifier in the Qostiq system | Integer | 6 |
sign | signature, see Signature formation rules for crypto operations (sign) | String | "e77dc50d3e4bc3b307924aaefeab1887d38e1aa0d73ba17a2bdad99893b984e6" |
Example response:
{
"data": {
"fee": "0.0",
"payee_currency": "TRX",
"receive_amount": "10.0",
"shop_currency": "TRX",
"write_off_amount": "10.0"
},
"error_code": 0,
"message": "Ok",
"result": true
}
Where,
fee — payout fee;
payee_currency — payee receiving currency;
receive_amount — amount to be received to the account in the currency from the payee_currency parameter;
shop_currency — debit currency from the shop balance;
write_off_amount — amount written off from the shop in currency from the shop_currency parameter.
Creation of payout to Qostiq wallet [/crypto/transfer/create]
URL: https://core.qostiq.com/crypto/transfer/create
Method: POST
Mandatory parameters: amount, amount_type, now, payee_account, payer_currency, shop_currency, shop_id, shop_payment_id
This request creates a payout entity on the client's Qostiq wallet.
The value of the shop_payment_id parameter must be unique for each new transfer.
Additional parameters can be passed in the request, for example, description — payout description.
Attention! At the moment, making payouts from conversions is not available. When creating, the same currency must be specified in the parameters "payee_currency" and "shop_currency", otherwise the request will receive an error "message": "Currencies must be the same".
Example request:
{
"amount": 10,
"amount_type": "writeoff_amount",
"now": 1691484449,
"payee_account": "31645670435",
"payee_currency": "TRX",
"shop_currency": "TRX",
"shop_id": 6,
"shop_payment_id": "bfe31d10-adea-40f4-9249-d2dafa2e09db",
"sign": "6a3a94b38df2d2041ad75b44d3f259b75064b3deebba8f6c50c784cbe686b9bf"
}
Where,
| Parameter | Description | Format | Example |
|---|---|---|---|
amount | payout amount | String or number, see "Specifying the operation amount" for details | "1.00000001" or 1.00000001 |
amount_type | indicates the amount type, possible values: receive_amount — amount to be received to the wallet in payer_currency currency, writeoff_amount — amount to be written off the shop balance in shop_currency currency | String | "receive_amount" or "writeoff_amount" |
now | request time, in unixtimestamp format | Integer | 1691484449 |
payee_account | account of the recipient of funds in the Qostiq system, both the wallet number and the user's email can be transmitted | String | "31645670435" or "example@mail.com" |
payer_currency | currency of receiving funds to the client's wallet | String | "TRX" |
shop_currency | currency of debiting funds from the shop balance | String | "TRX" |
shop_id | shop identifier in the Qostiq system | Integer | 6 |
shop_payment_id | unique payment identifier on the merchant side | String | "bfe31d10-adea-40f4-9249-d2dafa2e09db" |
sign | signature, see Signature formation rules for crypto operations (sign) | String | "6a3a94b38df2d2041ad75b44d3f259b75064b3deebba8f6c50c784cbe686b9bf" |
Example response:
{
"data": {
"fee": "0.0",
"id": 1266,
"payee_currency": "TRX",
"receive_amount": "10.0",
"shop_currency": "TRX",
"write_off_amount": "10.0"
},
"error_code": 0,
"message": "Ok",
"result": true
}
Where,
fee — payout fee;
id — unique transfer identifier on the Qostiq side;
payee_currency — payee receiving currency;
receive_amount — amount to be received to the account in the currency from the payee_currency parameter;
shop_currency — debit currency from the shop balance;
write_off_amount — amount written off from the shop in currency from the shop_currency parameter.
Attention! The transfer operation has no status because if it was created and the transfer ID was returned in the response, then the transfer is considered successful — no additional requests are required.
Payout status request to Qostiq wallet [/crypto/transfer/status]
Transfer status request is performed by the merchant's payment number.
If you receive a time-out or other errors on the transfer creation request, you can request the payout status using this method. If the identifier and data on the transfer are returned in the response, then the payout was successfully created and carried out. Otherwise, an error will be returned that the payout was not found and it will be necessary to repeat the request to create a payout.
URL: https://core.qostiq.com/crypto/transfer/status
Method: POST
Mandatory parameters: now, shop_id, shop_payment_id
| Parameter | Description | Format | Example |
|---|---|---|---|
now | request time | Integer | 1691491958 |
shop_payment_id | payment number on the side of your service | String | "bfe31d10-adea-40f4-9249-d2dafa2e09db" |
shop_id | shop identifier in the Qostiq system | Integer | 6 |
sign | signature | String | "a39c6eee74e6213a722e4f85ee05b0207d05e25b7c54b75f14fe646a86832948" |
Example request:
{
"shop_id": 6,
"shop_payment_id": "bfe31d10-adea-40f4-9249-d2dafa2e09db",
"now": 1691491958,
"sign": "a39c6eee74e6213a722e4f85ee05b0207d05e25b7c54b75f14fe646a86832948"
}
Example response if the transfer was created and carried out:
{
"data": {
"fee": "0.0",
"id": 1266,
"payee_currency": "TRX",
"receive_amount": "10.0",
"shop_currency": "TRX",
"write_off_amount": "10.0"
},
"error_code": 0,
"message": "Ok",
"result": true
}
Example response if the transfer was not created (not found):
{
"data": null,
"error_code": 7,
"message": "Transfer (shop_payment_id=test_order_name) wasn't found",
"result": false
}