Permanent addresses for deposits
Permanent addresses are used to accept cryptocurrency deposits without prior order creation by the merchant. Receipt of the amount to the deposit address initiates the creation of a new order in the FlyPay system, and the order result is sent to the merchant at callback_url
.
Creating a deposit address
Request
POST /v2/deposit_address/create HTTP/1.1
Content-Type: application/json
Accept: application/json; charset=utf-8
Api-key: {publicApiKey}
Signature: {signature}
{
"currency": "trx",
"network": "trc20",
"currency_to": "usdt" //optional
"callback_url": "", //optional
"address_title": "Test address", //optional
"client_info": { //optional
"client_id": "id1234",
"client_ip": "127.0.0.1",
"client_email": "[email protected]"
}
}
Description of parameters in the request:
currency
– Deposit currencynetwork
– Deposit networkcurrency_to
– The currency into which the deposit will be exchangedcallback_url
– URL address for server-to-server message about deposit order execution resultaddress_title
– A name for the deposit addressclient_info
– customer data in the merchant system: identifier, IP, email
You can get an up-to-date list of available deposit currency and network codes from the rates
API method.
Check results for order type deposit
when creating addresses without exchanging, and deposit_exchange
order type when creating addresses with exchanging.
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
/* The overall status of the request, not the order status */
"status": "success",
"data": {
"uuid": "e3ea9935-e3da-4ad5-bcaf-75067c812529",
"client_id": null,
"currency": "trx",
"network": "trc20",
"currency_to": "usdt",
"address_title": "Test address",
"address": "TVb4KtWABb9vyzMhiLm3cgFaE11MCZfvQu",
"memo": null,
"callback_url": null,
"created_at": "1970-01-01 14:48:53",
"min_amount": "4",
"max_amount": "100000",
"total_received_amount": null,
"total_received_deposits": null
}
}
Description of parameters in the response:
uuid
– Address ID in the FlyPay systemclient_id
– Client ID in the merchant systemcurrency
– Deposit currencynetwork
– Deposit networkcurrency_to
– The currency into which the deposit will be exchangedcallback_url
– URL address for server-to-server message about deposit order execution resultaddress_title
– A name for the deposit addressaddress
– The address on the blockchain to which the deposit should be sentmemo
– tag/memo of the address on the blockchain to which the deposit should be sentcreated_at
– Date and time of address creation in the format "Y-m-d H:i:s"min_amount
– Minimum deposit amountmax_amount
– Maximum deposit amounttotal_received_amount
– The sum of all deposits to this addresstotal_received_deposits
– Number of deposits to this address
Getting a list of deposit addresses
Request
POST /v2/deposit_address/list HTTP/1.1
Content-Type: application/json
Accept: application/json; charset=utf-8
Api-key: {publicApiKey}
Signature: {signature}
{
"currency": "usdt", //optional
"network": "trc20", //optional
"limit": 100, //optional, from 1 to 100
"page": 1 //optional
}
Description of parameters in the request:
currency
– Deposit currencynetwork
– Deposit networklimit
– Number of addresses in the response, available from 1 to 100 (default 100)page
– Page number from which to start issuing results, 1 or more (one page containslimit
addresses)
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
/* The overall status of the request, not the order status */
"status": "success",
"data": [
{
"uuid": "e3ea9935-e3da-4ad5-bcaf-75067c812529",
"client_id": null,
"currency": "trx",
"network": "trc20",
"currency_to": "usdt",
"address_title": "",
"address": "TVb4KtWABb9vyzMhiLm3cgFaE11MCZfvQu",
"memo": null,
"callback_url": null,
"created_at": "1970-01-01 14:48:53",
"min_amount": "4",
"max_amount": "100000",
"total_received_amount": null,
"total_received_deposits": null
}
]
}
The data
field of the response contains an array of found addresses.
See address creation response for details about single address data.