JavaScript SDK
The@nowramp/sdk package provides the RampApi client for fetching quotes, creating checkouts, and tracking transactions across multiple payment gateways.
Installation
Quick Start
RampApi Class
Constructor
Configuration
Methods
getSupported(params?)
Get supported configuration (gateways, currencies, payment methods) across all enabled providers.getQuotes(params)
Get quotes from all enabled gateways, ranked by best rate.createCheckoutIntent(params)
Create a checkout with a specific gateway. Returns a checkout URL for iframe or redirect.getTransaction(transactionId)
Get transaction status, synced with the gateway’s latest data.validateAddress(params)
Validate a wallet address format.getSupportedNetworks()
Get supported networks for address validation.Standalone Functions
Common API functions are also exported as standalone functions for minimal setup:TypeScript Support
The SDK includes full TypeScript definitions:UMD Build
For non-bundled usage via CDN:Browser Support
Bundle Size
Legacy Methods (Deprecated)
getRate(params) — deprecated
Get a conversion rate from a single provider. Returns one rate instead of comparing across gateways.
Returns:
RateResult
getRate() with getQuotes() to compare rates across all gateways:
getCurrencies() — deprecated
Get available currencies from a single configured provider.getCurrencies() with getSupported() to get currencies, payment methods, and gateways across all providers:
Standalone legacy functions
The legacy methods are also available as standalone functions:Next Steps
- Onramp API — Full endpoint documentation
- React Components — Drop-in checkout form with hooks
- Multi-Provider Quotes — Build a quote comparison UI