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
Debug mode lets you inspect the widget’s behavior and explore customization options. To enable it, passdebug: true to the constructor:
?debug=true to the URL.
Next steps
- Customize the appearance — apply colors, border radius, and a custom logo to match your brand