USD to Cryptocurrency

This guide walks you through implementing an example fiat-to-crypto solution using Beam's API. You'll learn how to create a system that can move money to another country by leveraging local entities.


Use Case Summary

Of the many use cases you can construct with the USD to Cryptocurrency flow, we will focus on remittance enablement.

Your business provides a solution to improve the operations of remittance companies. Your customers want to:

  • Ensure their users, immigrants to the US, can send money to their family and friends in their home country
  • Improve the time it takes your customer to have the funds available to their foreign entity
  • Use local off-ramps seamlessly to get the funds to the recipient

Breaking Down the Flow

In the above use case, you are providing a more efficient payment rail to an online money transfer platform. Your customer will have the licenses necessary to receive funds from end users and move funds around in the country where the recipient resides. They will most likely have integrated a solution to receive funds by card payment or ACH Pull from their users as well. We'll walk through the steps here and you can find more detail on the following pages:

  1. Your Beam account comes configured with a variety of crypto assets and associated wallets. To get the deposit instructions that you will provide to your customer see Retrieve Deposit Instructions. They will include the routing number and account number your customer will be sending funds to.
  2. Share the instructions on your platform's UI or manually provide them to your customer. These will not change and will be shared by all your customers.
  3. Your customer will send the funds to your Beam account using the above instructions. Note: They must include the ID that matches the format "FTxxxxxxxxxxxx" (shown as refCode in the Dashboard and API) in the memo of the transfer for it to reach your account. Your system will be responsible for tracking which payments correspond to which customers' deposits.
  4. Once the deposit has arrived in your Beam bank account, Beam will detect and validate it. With automation Disabled and withdrawal frequency set to On-demand in your Beam account (see Introduction > Configure Payment Settings), Beam will hold the USD in your Beam account and await your instruction on what to do with your customer's funds.
    1. Your ability to trade and transfer out is limited by when Beam receives the deposit. See Support > Settlement to ensure that you are getting the desired transaction speed.
    2. There is a pre-funding option available if you require instant initiation of trade and transfer. Talk to your representative or write us at [email protected] for more information.
  5. Once you have USD funds in your Beam account, you can initiate a trade to the asset and network you will be transferring out (see Trade a received Deposit). You can choose to trade on a per-deposit basis or batch your trades based on your needs.
    1. At this time, it's best to poll for the status of your deposit and trade periodically using the /smb/wallets endpoint.
    2. If you have registered to receive webhooks (see Best Practices > Webhook Registration) Beam will send an event via webhook to you when the deposit is received. Your system should be looking for a DEPOSIT_STATUS_CHANGE event with the type: DEPOSIT_RECEIVED.
  6. Once you've detected that your funds have been traded, you will initiate the payment of cryptocurrency to your customer's wallet. Your system will be responsible for tracking which payments correspond to which customers deposits.
    1. This assumes you have already added your customer's external destination wallet prior to initiating the payment to them. See Introduction > Configure Connected Accounts if you have not done that.
  7. Beam will deposit the cryptocurrency into your customer’s external destination wallet. See Support > Settlement to understand when to expect the transaction to complete given the time you initiated the trade and payment.
  8. Your customer, through the cryptocurrency wallet address they gave to you, will have a relationship with a local entity in the country where the recipients of their remittances reside. They will use this account to get quickly trade the crypto you sent them to the local currency. You must notify your customer when the payment has completed so they may do so.
    1. Use /smb/transactions with the ID given in Step 5 to check the status of the payment so that you can notify your customer.