Overview
Grid supports sending Bitcoin via Lightning Network to self-custody wallets using Spark wallet addresses. This enables users to maintain full control of their crypto while benefiting from Grid’s fiat-to-crypto conversion and payment rails.Spark wallets use the Lightning Network for instant, low-cost Bitcoin
transactions. Users can receive payments directly to their self-custody
wallets without Grid holding their funds.
How it works
- User provides wallet address - Get Spark wallet address from user
- Create quote - Generate quote for fiat-to-crypto or crypto-to-crypto transfer
- Execute transfer - Send crypto directly to user’s wallet
- Instant settlement - Lightning Network provides near-instant confirmation
Prerequisites
- Customer created in Grid
- Valid Spark wallet address from user
- Webhook endpoint for payment notifications (optional, for status updates)
Sending crypto to self-custody wallets
Step 1: Collect wallet address
Request the user’s Spark wallet address. Spark addresses start withspark1:
Step 2: Create external account for the wallet
Register the Spark wallet as an external account:Step 3: Create and execute a quote
Option A: From fiat to self-custody wallet
Convert fiat directly to crypto in user’s wallet:Option B: From internal account to self-custody wallet
Transfer crypto from internal account to user’s wallet:Step 4: Monitor transfer completion
Track the transfer status viaOUTGOING_PAYMENT.<STATUS> webhooks:
Best practices
Validate wallet addresses
Validate wallet addresses
Always validate Spark addresses before processing:
Handle Lightning Network specifics
Handle Lightning Network specifics
Lightning Network has unique characteristics:
Provide clear user instructions
Provide clear user instructions
Help users understand the process:
Handle failed transfers
Handle failed transfers
Implement retry logic for common failures: