Before you begin
- You have a Meld Checkout URL from the dashboard’s Developer tab
- You have access to both sandbox and production dashboards
- You know where in your app users should land before and after the checkout
Step 1: Get users to the Meld Checkout widget
Now that you have your Meld Checkout widget URL (see Quickstart Step 1 if not), here are code examples for embedding the URL in your application or redirecting users to it.Redirection Examples
HTML Link Integration
The simplest integration - redirect users to the widget:JavaScript Redirect
For programmatic control:New Tab/Window Opening
Open widget in a new window:Iframe Embedding Examples
For embedded experience within your application:Iframe Best Practices:
- Minimum width: 450px for optimal display
- Minimum height: 790px to prevent UI overlap
- Allow permissions: Include
camera,microphone,paymentfor KYC and transactions - Responsive design: Consider dynamic sizing for mobile
Step 2: Customization with URL Parameters
Add optional parameters to your Meld Widget URL for customization:Key Parameters:
- sourceAmount - Pre-fill purchase amount (e.g., 100)
- destinationCurrencyCode - Pre-select cryptocurrency (e.g., BTC, ETH_ETHEREUM)
- walletAddress - Pre-fill destination wallet if known
- countryCode - Override auto-detected country (rarely needed)
Step 3: Testing Your Integration
Sandbox Testing
Always test in sandbox environment first:Test Workflow:
- Redirect to sandbox widget with your parameters
- Complete the test transaction using the sandbox testing credentials
- Verify webhook reception (if implemented)
- Test all user flows (buy/sell as applicable)
Step 6: Mobile Implementation
React Native Example:
Deep Link Return:
Mobile Considerations:
- Use redirectUrl with deep links to return users to your app
- Consider theme parameter to match your app’s appearance
- Test on both iOS and Android for compatibility
Step 4: Go Live
Production Checklist:
- ✅ Use production Meld Widget URL (from Developer tab in production environment)
- ✅ Test with small real transaction
- ✅ Verify webhook endpoints are working
- ✅ Monitor first transactions for issues
Production URL:
Troubleshooting Common Issues
Widget Won’t Load
- ✅ Verify Meld Widget URL is correct and from the right environment
- ✅ Check for browser popup blockers
- ✅ Ensure iframe permissions are set correctly
Parameters Not Working
- ✅ URL encode parameter values
- ✅ Check parameter spelling and case sensitivity
- ✅ Verify parameter combinations are valid
Mobile Issues
- ✅ Test deep link return flow
- ✅ Verify redirectUrl format is correct
- ✅ Check mobile browser compatibility
Error Handling
JavaScript Error Handling:
Iframe Error Handling:
Next Steps
Optimize your integration
- URL parameters — complete parameter reference
- Customization — styling and advanced options
Monitor and improve
- Webhook events — real-time notifications
- Transaction statuses — understanding transaction states
- Dashboard data — analytics and reporting
Your Widget Integration is now live! Users can purchase crypto directly through your application with Meld’s secure, compliant widget.