Skip to main content

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.
Parameters:

getQuotes(params)

Get quotes from all enabled gateways, ranked by best rate.
Parameters:

createCheckoutIntent(params)

Create a checkout with a specific gateway. Returns a checkout URL for iframe or redirect.
Parameters:

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)

The methods below are deprecated and will be removed in a future release. They query a single payment provider instead of comparing across all gateways. Use getQuotes() and getSupported() instead.

getRate(params) — deprecated

Get a conversion rate from a single provider. Returns one rate instead of comparing across gateways.
Parameters: Returns: RateResult
Migration: Replace getRate() with getQuotes() to compare rates across all gateways:

getCurrencies() — deprecated

Get available currencies from a single configured provider.
Migration: Replace 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