Table of Contents
- Prerequisites
- Initial setup (required for all transfers)
- Off ramping crypto to fiat
- Option A: Signature-based transfer (via transfer intent)
- Option B: Direct transfer (via funding address)
- On ramping fiat to crypto
- Virtual accounts (fiat on-ramp) Dedicated banking details for automatic fiat-to-crypto conversion.
- Tracking transfer status
Prerequisites
You will need an API key for the Due Network APIs.Initial setup (required for all transfers)
Before executing any transfers, you must create and link accounts for your user.1. Create a customer account in Due
Create an account for your user in Due. Save the returnedid as ACCOUNT_ID.
2. Create or get a Privy wallet
Create an embedded wallet for the user via the Privy API. Save theid as wallet_id and the wallet’s address.
3. Link Privy wallet to Due account
Link the Privy wallet address to the user’s Due account.Off ramping crypto to fiat
This flow moves cryptocurrency from a user’s Privy wallet to an external bank account. You can choose between two methods:- Signature based transfer: via Transfer Intent, more secure, requires signatures.
- Direct transfer via funding address: simpler, no signatures needed.
Option A: Signature-based transfer (via transfer intent)
This method involves the user signing transaction data with their Privy wallet.Step 1: Create a recipient
Define the destination bank account.Step 2: Get a quote
Get a quote for the transfer. Note: Quotes are short-lived (2 mins), so get it right before creating the transfer.Example quote
Example quote
Be sure to take note of the
token field in the response, as you’ll need it to create the
transfer.Step 3: Create a transfer
Use the token returned by the quote to create the transfer.Step 4: Create & sign the transfer intent
-
Create the Intent: Request a transfer intent from Due for the transfer ID (
tf_...) created above.The response contains asignablesarray, typically with two objects to sign (PermitandPayoutIntent). -
Sign with Privy: For each object in the
signablesarray, call the Privy API to get a signature or send the signables to the client side for signing. Use theeth_signTypedData_v4method with thevalueobject from each signable.
Step 5: Submit the signed intent
Submit the original transfer intent object back to Due, now including thesignature for each object in the signables array.
Option B: Direct transfer (via funding address)
This simpler method provides a temporary address to send funds to, avoiding the signature flow.-
Create Funding Address: After creating a transfer (Steps 1-3 above), request a funding address for it.
-
Send funds from the wallet: Use the Privy API to sign and submit the onchain transfer for the exact amount to the funding
addressreceived. The transfer will process automatically once funds are received.
On ramping fiat to crypto
This flow lets users convert fiat currency from a bank account into cryptocurrency through Due, which deposits crypto into the user wallet. It involves obtaining a transfer quote, creating the transfer, and providing the user with banking details to complete the transaction. Due handles the fiat-to-crypto conversion and settlement, requiring no additional signatures or manual intervention.-
Get a quote:
-
Create a transfer: Use the quote token and specify your linked Due wallet ID as the
recipient. -
Provide banking details to the user: The API response will include
bankingDetails(account number, routing number, etc.). Share these details with the user so they can initiate the fiat transfer from their bank account. Due handles the conversion and deposits the cryptocurrency into the recipient wallet automatically. No additional signatures are required.

