Multi-Provider Quote Comparison
This guide walks you through building a checkout experience that compares quotes across multiple payment gateways and lets users pick the best option.Overview
The NowRamp aggregation system works in three steps:- Fetch supported config — currencies, payment methods, and gateways available for your project
- Fetch quotes — get ranked quotes from all gateways in parallel
- Create checkout — send the user to the selected gateway’s checkout
Using React Hooks (@nowramp/form)
The@nowramp/form package provides hooks that handle all API calls, loading states, and cache invalidation.
Step 1: Fetch Supported Configuration
Step 2: Fetch and Display Quotes
Step 3: Create Checkout Intent
Step 4: Track Transaction
Using Vanilla JavaScript (RampApi)
For non-React apps, use theRampApi class directly.
Complete Example
Gateway Differences
Each gateway has different capabilities. Use thefeatures field from getSupported() to adapt your UI dynamically. For example, some gateways support iframe-based checkout while others use a redirect or widget. Some handle KYC internally, while others may require a separate verification step.
Handling Gateway-Specific Behavior
Quote Ranking Strategies
The API returns three pre-ranked convenience fields:| Strategy | Field | Description |
|---|---|---|
| Best rate | bestQuote | Most crypto for your fiat |
| Fastest | fastestQuote | Shortest estimated processing time |
| Cheapest fees | cheapestFees | Lowest total fee amount |
score (a 0-100 composite routing score) or implement your own ranking logic using the raw quotes array.
Error Handling
Unavailable Gateways
When a gateway can’t provide a quote, it appears inunavailableGateways:
Amount Validation
The API validates amounts against provider limits. If an amount is out of range, you’ll get a validation error:minAmount and maxAmount fields from getSupported() to validate before fetching quotes.
Next Steps
Onramp API Reference
Full endpoint documentation
React Components
Drop-in form components
JavaScript SDK
SDK methods for onramp
Webhooks
Server-side order notifications