Crypto deposits

Crypto deposits are similar to bank transfers. If you know the recipient’s bank account number, you can send them money. This approach differs from classic payment methods because the transaction cannot be created before the funds have appeared in the bank account. The same way web-services cannot expect that crypto deposit transactions will be initiated from the "payment form" every time because, in general, there is no such term for cryptocurrencies.

Unlike the classical approach, web-services should handle callbacks from payment providers with information about received deposits. When web-services receive the first callback, they then create the transaction. After the transaction is confirmed by the payment provider, the second callback will inform the web-services about the status of the transaction. Then, web-services can provide the user with a specific service.

Attention!

Common deposit workflow

The most common scenario for receiving cryptocurrency is deposit with exchange. CoinsPaid provides web-services with on-the-fly exchange solution. It means that all funds that were received from the users can be automatically converted into fiat currencies in order to avoid cryptocurrency fluctuations and exchange rate inconsistencies.

For exchanges between the USDC tokens, the exchange rate is always 1:1 — this means that 1 USDC in ERC-20 is always equivalent to 1 USDC in SOL. Standard fees for “deposits with exchange” still apply.

In case of regular deposits without exchange the workflow there will be the same but the conversion option will be skipped.

Algorithm

  1. User has EUR balance on your site

  2. User uses some kind of “deposit” option on your site and chooses BTC as a payment method to use for the payment

  3. Website shows a deposit BTC address to the user

  4. User scans QR code or copies the address and goes to their crypto wallet application

  5. When user sends BTC to this address our system makes an automatic exchange of received funds from BTC to EUR and your system gets the callback with the information about the deposit, including transaction's status, currency pairs, amount, fees and so on

  6. You add the amount from the callback to user’s EUR balance

In order to increase the conversion rate for crypto payments we have a special guide for how you can develop your payment form and provide the user with the best experience of crypto payments. There are good recommendations on how to build friendly and comfortable interactions with your interface for the user. Here you can find out how it can be implemented:

About the crypto payment form

Hint 1

Usually our merchants generate all the needed crypto addresses at the time when a new user is created. In order to do this you should use the "/v2/addresses/take" method from our API. You can define what currency should be used for receiving the funds from the user and, if necessary, into what fiat currency received funds should be converted.

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 may be an identifier of the end user or the operation or any additional information needed for your flow. Both values will be included in the response and in all the callbacks for the deposits to this address.

Attention

Hint 2

In case you would like to hold the exchange rate for 10 minutes in order to receive a specified amount from the user after converting the funds, you may want to use these methods: "/v2/futures/rates" + "/v2/futures/confirm"

Hint 3

As we keep a small amount of incoming funds as our fees, we provide you with the information about the fees in the callback. It is your choice what amount you will add to user's balance - including fees or not.

Last updated

Was this helpful?