Skip to main content

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:
  1. Fetch supported config — currencies, payment methods, and gateways available for your project
  2. Fetch quotes — get ranked quotes from all gateways in parallel
  3. 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 the RampApi class directly.

Complete Example


Gateway Differences

Each gateway has different capabilities. Use the features 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: You can also sort by 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 in unavailableGateways:
Common reasons include: unsupported currency pair, amount below minimum, geographic restrictions, or provider downtime.

Amount Validation

The API validates amounts against provider limits. If an amount is out of range, you’ll get a validation error:
Use the 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