Page cover

Deposits

Contains deposits description and provides common workflow for that feature

Crypto deposits are similar to bank transfers. If the recipient’s bank account number is known then the funds can be directly sent at any time. 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 will be 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". Citron 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.

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

Algorithm

  1. Client opens crypto payment method on merchants website

  2. The merchant makes a request to Citron for the clients wallet

  3. Citron sends a response with the clients wallet and saves the clients ID

  4. Merchant shows the wallet to the client

  5. The client makes a deposit

  6. Citron receives the transaction from the blockchain

  7. Citron sends transaction data to the merchants API

  8. The merchant provides a service for the amount paid

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:

What is 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 "/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.

In most cases it is useful to send us your user's ID as a "foreign_id" parameter. We will link it to the address and send it in the callbacks. Using such a method you will be able to understand which user made the deposit.

Attention

Hint 2

In order to get the information about current exchange rates for different currencies you can use the "/currencies/pairs" API method.

If you need to calculate exact amounts corresponding to current exchange rates try the "/exchange/calculate" method.

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?