Overview
The Nomad Pay Widget allows you to securely embed a crypto wallet connection and payment flow directly into your website. It supports two primary functions via a single SDK:- Payment Mode: Handle the entire checkout flow using a payment ID.
- Connect Mode: Connect a user’s wallet and request a signature (e.g., for login or verification).
Installation
Option A: CDN (Script Tag)
Add the following script to the<head> or body of your website.
Production URL:
Option B: NPM/Yarn
Package details coming soon.Basic Usage: Payment
This is the standard flow to collect a payment. Prerequisite: You must first call the backend API (POST /v1/payments) to generate an integration ID (also known as payment_id).
Step 1: Prepare a Container
Create a DOM element where the widget will be mounted.Step 2: Initialize the Widget
CallNomadPayWidget.Connect() with your configuration.
Usage: Connect Wallet & Sign
If you only want to connect a user’s wallet and get a signature (without creating a payment order), initialize the widget without theintegration parameter and set autoSignOnConnect to true.
Example:
Configuration Parameters
You can customize the behavior and look of the widget using the following parameters.Core Parameters
Chain Customization
Use these only if you need to restrict chains or use custom RPC endpoints.Internationalization
Callbacks & Response Data
onSuccessCallback
Triggered when the payment or connection is successful. Thedata object contains details about the connected wallet and signature.
Data Structure: