Create auto-withdrawal
Last updated
Last updated
The method create auto-withdrawal request
Amount limits apply to creation:
the amount must be more than $20 in equivalent
the amount must be twice the commission of the network of the final coin/network (see the method of obtaining available coins)
Parameter | Type | Required | Description |
---|
It is necessary to send one of the parameters:
amountFrom
oramountTo
When specifying two parameters, the priority will beamountFrom
By specifying the feeInAmount
parameter in the value true
, the specified amount + network commission will be debited from the address
If you specify amountFrom
, the final amount amountTo
may slip (it may differ from the one specified after the creation request)
If you specify amountTo
, the estimated amount of the debit from the address will be blocked + a percentage to cover the insurance of slippage. After the exchange is completed, the amount will be corrected to the amount that was spent for the swap.
There may be a slight slippage (≈ 0.1%) of the final amount due to the imposition of swap filters on the amount to be received
When creating a withdrawal from the payment acceptance widget, a webhook will be sent to the URL specified for withdrawal confirmation when creating the widget.
The webhook body will indicate the user who requested the withdrawal, the requested amount, the requested coins, and the conversion to the coin selected for withdrawal.
You can confirm or reject the withdrawal by sending the corresponding value in the request
Additional fields in the response body:
Name | Description |
---|
|
| yes | Destination address |
|
| yes | The coin you want to receive |
|
| yes | The network where you want to receive coins |
|
| no | Outgoing amount |
|
| no | The final amount |
|
| no | Include the network commission in the swap amount |
|
| no | URL for sending notifications when the status changes |
| URL for sending the webhook for confirmation |
| Confirmation data |
| API key data |
| Public part of the API key from which the confirmation came |
| Request data |
| IP address from which the request came |
| User-Agent from which the request came |
| Approved or rejected |
| Request time |
| User ID in the merchant system who requested the withdrawal |
| Requested coin when creating the withdrawal |
| Requested amount when creating the withdrawal |
The address to receive
"1CGuTUAx7icKniPVKGiyiT7QLycpkxULLP"
The coin you want to receive
"BTC"
The network where you want to receive coins
"bitcoin"
Outgoing amount
"1000"
The final amount
"0.1"
To include the network commission in the amount to swap, when specifying this parameter, the amountTo will be equal to the amount that the address will receive
URL for sending a status change notification
"https://merchant.domain/webhooks/..."
Request success indicator