Prerequisites
Before starting this guide, ensure you have:- A Grid API account with valid authentication credentials
- Access to the Grid API endpoints (production or sandbox)
- A webhook endpoint configured to receive notifications
- A Spark wallet address where the Bitcoin will be delivered
Overview
The on-ramp process consists of the following steps:- Create a customer via the API
- Create a quote for the USD-to-BTC conversion with current exchange rate
- Fund the quote using the provided payment instructions (JIT funding)
- Receive webhook notification confirming Bitcoin delivery to the Spark wallet
Step 1: Customer Onboarding
If your platform is a regulated financial institution that already has a KYC/KYB process in place, you can create a customer directly via the API. However, if your platform is not regulated, you must use the hosted KYC/KYB link flow to onboard your customers.- Regulated Platforms
- Unregulated Platforms
Regulated platforms have lighter KYC requirements since they handle compliance verification internally.
- Direct API Onboarding: Create customers directly via API calls with minimal verification
- Internal KYC/KYB: Handle identity verification through your own compliance systems
- Reduced Documentation: Only provide essential customer information required by your payment counterparty or service provider.
- Faster Onboarding: Streamlined process for known, verified customers
Creating Customers via Direct API
For regulated platforms, you can create customers directly through the API without requiring external KYC verification:To register a new customer in the system, use thePOST /customers
endpoint:bankAccountInfo
is always required:- Individual customer
- Business Customer
Step 2: Create a Quote for Fiat-to-Crypto Conversion
Create a quote to convert USD to Bitcoin and deliver it to a Spark wallet. The quote will provide the current exchange rate and payment instructions for funding.Request
Combined External Account Creation: The
externalAccountDetails
option
automatically creates the external account (Spark wallet) and uses it as the
destination for the Bitcoin transfer in a single API call. If you want to reuse
the same external accounts for many quotes, you can add them using the
/external-accounts
endpoint, and then use the accountId
in the quote creation request.Response
- Sending: $100.00 USD (including $2.50 fee)
- Receiving: 0.00083333 BTC (83,333 satoshis)
- Exchange rate: 8.3333 sats per USD cent (~$120,000 per BTC)
- Quote expires: In 5 minutes
- Payment instructions: Bank account details and reference code for funding
For JIT-funded quotes, do NOT call the
/quotes/{quoteId}/execute
endpoint.
Simply fund using the payment instructions, and Grid will automatically
execute the conversion upon receiving your payment. The execute endpoint is
used for quotes with an internal account or pullable external account as the source.Step 3: Fund the Quote (Just-in-Time)
In production, you would initiate a real-time push payment (ACH, RTP, wire, etc.) to the bank account provided inpaymentInstructions
, making sure to include the exact reference code RAMP-ABC123
in the transfer memo.
- Sandbox (Simulated)
- Production (Real Funding)
In Sandbox, you can simulate funding using the Response:
/sandbox/send
endpoint:The reference code is critical for matching your payment to the quote. Always
include it exactly as provided in the payment instructions.
Step 4: Receive Completion Webhook
Once Grid receives your payment and completes the USD-to-BTC conversion and delivery, you’ll receive a webhook notification:The customer now has 83,333 satoshis (0.00083333 BTC) in their Spark wallet!
Summary
You’ve successfully completed a fiat-to-crypto on-ramp! Here’s what happened:- ✅ Created a customer via API
- ✅ Created a quote with exchange rate and payment instructions
- ✅ Funded the quote using JIT payment (simulated in sandbox)
- ✅ Bitcoin automatically converted and delivered to Spark wallet
Next Steps
- Off-ramps: Learn how to convert crypto to fiat in the Crypto-to-Fiat guide
- Self-custody wallets: Explore advanced wallet integration in the Self-Custody Wallets guide
- Webhook verification: Implement signature verification for security (see Webhooks guide)
- Sandbox testing: Learn more about testing in the Sandbox Testing guide
Related Resources
- API Reference - Complete API documentation
- Implementation Overview - High-level architecture and flow
- Platform Configuration - Configure your platform settings