Search…
⌃K

Receive assets

So you decided to start receiving assets? In this article, we are going to show you various ways how you can achieve this goal.
Whenever a user on your website wants to pay for something using crypto, he'll need a cryptocurrency wallet address to send funds to. If a wallet address is non-existent at the moment, it will automatically be generated upon first request.
Due to how blockchain works, all generated wallet addresses are stored forever and cannot be deleted. Thus users might save such address in order to send another payment without the need to go through checkout process once again.

Creating Deposit Addresses

There're two ways to generate a deposit address. Depending on your needs, you can either choose to create permanent wallet addresses (for multiple deposits to this address), or rotating wallet adddresses (for one-time deposits).

Option 1: Permanent Crypto Address

Payments can be received using Create Permanent Deposit Address feature. Such address will be generated and assigned to your merchant permanently, with ability to receive multiple transactions. Thus, any incoming transaction to a permanent address will be added to your merchant's balance, even if you generate new wallet addresses.

Option 2: Rotating Wallet Address

You can also use the Create Rotating Deposit Address endpoint to generate a temporary wallet address. Such an address can be used to receive a single incoming transaction within a set timeframe. What this implies is that you can specify the duration for which the wallet address wil stay active.
Rotating wallet address will deactivate in 2 cases:
  • after receiving a single incoming transaction;
  • after the expiration of duration timer.

Overall workflow is pretty simple:

Example: Receiving funds on Ethereum blockchain
Let's imagine that the user wants to checkout at your website and pay using crypto.
  1. 1.
    Your website sends HTTP Request to receive a wallet address for the chosen blockchain.
  2. 2.
    HTTP Response containing wallet address is sent back by 0xpay and displayed to a user on your website.
  3. 3.
    User now sends a transaction to the wallet address displayed on the website.
  4. 4.
    0xpay sends a replenish notification to your server with info about the replenishment, including status, amount and time of transaction.
  5. 5.
    After the transaction is confirmed, the only thing left for you is to add these funds to the user's balance on your website (or process the purchase further).
Funds will be added to your Merchant's balance after 3-19 confirmations on blockchain, depending on the used network:
  • Bitcoin – 3 confirmations
  • Ethereum (ERC20) – 12 confirmations
  • Binance Smart Chain (BEP20) – 12 confirmations
  • Tron (TRC20) – 19 confirmations
This rule is applied to all available assets and networks.
It is also great to notify the user about some details regarding his payment: asset and blockchain network, exchange rate, time limits, etc.