Withdrawals
Contains withdrawals description and provides common workflow for that feature
Last updated
Contains withdrawals description and provides common workflow for that feature
Last updated
To the opposite of deposits, sending cryptocurrencies to the users is similar to classic payment methods. Users fill the form where they provide the address and the amount of the withdrawal. After that the web-service creates the transaction and sends a withdrawal request to the payment provider. When the transaction is confirmed by the payment provider, the web-service decreases the user's balance on the website.
The most common scenario for sending crypto is "withdrawal with exchange". Coinspaid provides web-services with on-the-fly exchange solution. This means that the funds that are stored on a merchant's fiat balance can be automatically converted into cryptocurrencies before being sent to the user's crypto wallet.
For exchanges between the USDT tokens (USDTB, USDTE, USDTT) or between the USDC tokens (USDC, USDCS), the exchange rate is always 1:1 — for example, 1 USDTT is always equivalent to 1 USDTE. Standard fees for “withdrawals with exchange” still apply.
In case of regular withdrawals without exchange the workflow will be the same except of conversion operation.
Algorithm
You have EUR balance in our system
User wants to get a withdrawal from their EUR balance on your site to their BTC wallet
User uses some kind of “withdrawal” option on your site, chooses BTC as the currency to use for the payout and fills the payout form with their BTC address where they want to receive the funds and the withdrawal amount.
After that your system makes the request to our processing.
Our system makes an automatic exchange from EUR to BTC, sends funds to the user’s crypto address and your system gets the callback with transaction parameters, including the transaction's status, currency pairs, amount, fees and so on.
You decrease the user's EUR balance for the transaction amount
In order to make a withdrawal you should use the "/v2/withdrawal/crypto" method from our API. You can define what currency should be used to send the funds, and, if necessary, from what fiat currency the funds should be converted before sending to the user.
A request to the endpoint needs to include two additional identifiers: end_user_reference
and foreign_id
. The end_user_reference
value must be a persistent identifier of the end user in your system that does not change between operations. The foreign_id
value must be a unique identifier of the operation, i.e., each call of this API method must use a different foreign_id
. Both values will be included in the response and in all the callbacks related to the transaction.