Skip to main content

Embeddable Widget

The NowRamp widget is a drop-in solution that handles the entire crypto buying flow. Embed it in your application via iframe or JavaScript SDK.

Features

  • Complete Buy Flow - Amount selection, KYC, payment, and confirmation
  • Customizable Branding - Match your app’s look and feel
  • Multi-Language - i18n support out of the box
  • Mobile Responsive - Works on all device sizes
  • Secure - PCI-compliant payment handling

Widget Flow

The widget guides users through a step-based flow:

Standard Flow

Streamlined Provider Flow

Some payment providers handle identity verification (KYC) as part of their payment process. When using these providers, the widget skips the separate confirmation and KYC steps for a faster checkout experience.
When a payment provider handles KYC internally, users complete identity verification within the provider’s interface. This reduces friction and speeds up the onboarding process for first-time users.

Quick Start

Option 1: iframe Embed

<iframe
  id="ramp-widget"
  src="https://widget.nowramp.com?apiKey=YOUR_API_KEY&projectId=YOUR_PROJECT_ID&externalUserId=user_123"
  width="400"
  height="600"
  frameborder="0"
  allow="clipboard-write"
></iframe>

Option 2: JavaScript SDK

npm install @nowramp/sdk
import { RampWidget } from '@nowramp/sdk';

const widget = new RampWidget({
  apiKey: 'YOUR_API_KEY',
  projectId: 'YOUR_PROJECT_ID',
  externalUserId: 'user_123',
  containerId: 'ramp-widget-container',
});

widget.mount();

Configuration Options

OptionTypeRequiredDescription
apiKeystringYesYour project API key
projectIdstringYesYour project ID
externalUserIdstringYesYour user’s ID
containerIdstringSDK onlyDOM element ID to mount widget
modestringNo"buy" or "sell" (default: buy)
defaultCryptostringNoPre-select crypto (e.g., “ETH”)
defaultFiatstringNoPre-select fiat (e.g., “USD”)
defaultAmountstringNoPre-fill amount
walletAddressstringNoPre-fill wallet address
themeobjectNoCustom theme colors
localestringNoLanguage code (e.g., “en”, “es”)

Example: Full Configuration

const widget = new RampWidget({
  // Required
  apiKey: 'ramp_live_abc123',
  projectId: 'project_xyz789',
  externalUserId: 'user_123',
  containerId: 'widget-container',

  // Optional
  mode: 'buy',
  defaultCrypto: 'ETH',
  defaultFiat: 'USD',
  defaultAmount: '100',
  walletAddress: '0x742d35Cc...',

  // Theming
  theme: {
    primaryColor: '#6366F1',
    borderRadius: '12px',
  },

  // Localization
  locale: 'en',
});

URL Parameters (iframe)

When using iframe, pass configuration via URL parameters:
https://widget.nowramp.com?
  apiKey=ramp_live_abc123
  &projectId=project_xyz789
  &externalUserId=user_123
  &mode=buy
  &defaultCrypto=ETH
  &defaultFiat=USD
  &defaultAmount=100
  &parentOrigin=https://partner-app.com
Always include parentOrigin to enable secure communication between the widget and your app.

Security

The widget is designed with security in mind:
  • API Key Handling - Keys are validated server-side
  • Session Management - Secure sessions for each user
  • Origin Verification - postMessage validated against parentOrigin
  • PCI Compliance - Payment data never touches your servers

Browser Support

BrowserMinimum Version
Chrome80+
Firefox75+
Safari13+
Edge80+
Mobile SafariiOS 13+
Chrome Android80+

Next Steps