Cryptocurrency to USD
Overview
This guide walks you through implementing an example crypto-to-fiat payment processing solution using Beam's API. You'll learn how to create a system that allows your customers to receive crypto payments from their clients and have those funds automatically converted to fiat and deposited into their bank accounts.
Use Case Summary
Your business provides payment processing services to B2B companies that want to accept cryptocurrency payments from their clients. Your customers (the B2B companies) want to:
- Accept payments in cryptocurrency (e.g., USDC)
- Receive the funds as fiat (e.g., USD) in their bank accounts automatically
- Track payment status through your platform
Real-world example
A B2B supplier named Digital Tech International (DTI) sells products to distributors in foreign countries. When DTI needs to get paid, they use your platform to facilitate accepting crypto from their distributors. The distributor (CelularMex) pays in USDC, and DTI receives USD in their bank account. DTI is able to track the progress of the payment along the way.
Flow of Funds

Breaking Down The Flow

In the above flow, you are acting as a payment processor that has integrated with Beam to provide the necessary infrastructure to accept crypto and make deposits to external fiat accounts via ACH or wires. As a payment processor, you’ll have multiple customers who each have their own clients that they transact with on a day to day basis. When those customers exchange goods or services with their clients, they want to get paid quickly and without hassle. This flow explains how you can enable that. We'll briefly walk through the steps here and you can find more detail on the following pages:
- Your Beam account comes configured with a variety of crypto assets and associated wallets. You as a payment processor can enable your customers to accept payment via any of those crypto assets. To do this, you’ll need to give the wallet addresses to your customers so that they can instruct their clients to pay them via these addresses.
- Note: All of your customers and all of their clients will use the same wallet addresses. While you can use the /smb/wallets endpoint to automate the retrieval of these addresses, the addresses will remain static.
- This flow assumes that you have already allowed your customers to add an external fiat account and that your system has used the /smb/externalAccounts/ach or /smb/externalAccounts/wire APIs to set these accounts up within Beam. See Introduction > Configure Connected Accounts if you have not done that.
- Once your customer (DTI) decides how they want to get paid (which crypto asset) and has the wallet address for that crypto asset, they can share that with their client on an invoice or other payment instructions.
- Your customer’s client (CelularMex) will use whichever digital wallet they are familiar with (Metamask, Phantom, CakeWallet, etc.) to deposit the specified crypto assets and the amount to the wallet address (the same address you shared with your customers).
- Once the crypto deposit is made by the client, Beam will detect the deposit and validate it. With automation Enabled and withdrawal frequency set to On-demand in your Beam account (see Introduction > Configure Payment Settings), Beam will automatically trade the crypto asset for USD in your Beam account and keep it there.
- At this time, it's best to poll for the status of your deposit and trade periodically using the get-wallets endpoint.
- If you have registered to receive webhooks (see Best Practices > Webhook Registration) Beam will send an event via webhook to your payment processing system so that your system can determine what to do with the newly received deposit. Your system should be looking for a DEPOSIT_STATUS_CHANGE event with the type: DEPOSIT_RECEIVED.
- Note: Be aware that Beam may also send a DEPOSIT_STATUS_CHANGE event with type: DEPOSIT_REJECTED. These are currently only thrown if your account has been suspended.
- Once the you've detected that your deposit has been traded, you can leverage the API to direct Beam to make the USD deposit in one of the configured bank accounts that you have mapped to your customer (see Introduction > Configure Connected Accounts). In this case you will determine which customer’s client made the payment using your platform, lookup that customers external fiat account (as previously configured) and use the /smb/transactions/payments/fiat API to initiate a withdrawal from Beam to your customer’s external fiat account.
- Beam will deposit the fiat into the customer’s external fiat account that you instructed them via your API call above. See Support > Settlement.
Updated 9 days ago