Overview
Grid enables seamless conversion between fiat currencies and cryptocurrencies via the Lightning Network. Use quotes to lock exchange rates and get payment instructions for completing transfers. On-ramp (Fiat → Crypto): User sends fiat → Grid detects payment → Crypto sent to wallet Off-ramp (Crypto → Fiat): Execute quote → Grid processes crypto → Fiat sent to bankPrerequisites
- Customer created in Grid
- On-ramps: Destination crypto wallet (Spark address) + webhook endpoint
- Off-ramps: Internal account with crypto + external bank account registered
On-ramp: Fiat to crypto
Create a quote
First, create an external account for the crypto destination:cURL
cURL
Display payment instructions
Monitor completion
Grid sendsOUTGOING_PAYMENT.<STATUS> webhooks as the transaction progresses:
Off-ramp: Crypto to fiat
Create and execute a quote
Track completion
Immediate execution
For instant on-ramps (e.g., reward payouts), useimmediatelyExecute: true with an internal account source:
cURL
immediatelyExecute can only be used with sources that are either internal accounts or external accounts with direct pull functionality (e.g., ACH pull).Best practices
Handle quote expiration
Handle quote expiration
Settlement times by payment rail
Settlement times by payment rail
Handle failed transactions
Handle failed transactions