Skip to main content
This guide walks you through embedding the SpherePay Ramp Widget in your web application. The setup requires no package installation — you import a hosted script, add a container element, and initialize the widget with your application ID.

Prerequisites

  • A SpherePay merchant account. Request access if you do not have one.
  • Your Merchant Application ID from the Settings page of your SpherePay dashboard.

Setup

1

Add a container element to your HTML

Add a <div> element to your page where you want the widget to appear. Give it an ID you’ll reference during initialization.
2

Import the Ramp Widget script

Add a <script> tag in your <head> that points to the hosted Ramp Widget bundle. Set the onload attribute to call your initializer function once the script loads.
3

Implement the initializer function

Define initSphereRamp() in your JavaScript. Create a new RampWidget instance, passing your container ID and Merchant Application ID.

Full example

Here is a minimal HTML page that embeds the Ramp Widget:

RampWidget constructor properties

Debug mode

Disable debug mode before deploying to production.
Debug mode lets you inspect the widget’s behavior and explore customization options. To enable it, pass debug: true to the constructor:
You can also enable debug mode on any Ramp Widget page by appending ?debug=true to the URL.

Next steps

Last modified on April 30, 2026