Developer SDK & Elements
Accept XRP, RLUSD, and custom XRPL token payments on any website or application. Use our UMD/ESM JavaScript SDK, custom Web Components, or React Hooks.
Quick Start
Integrate XRPay payments into your checkout flow in three simple steps.
Retrieve API Keys
Sign in to your dashboard, navigate to **Settings > API Keys**, and generate your publishable key (pk_test_* or pk_live_*).
Include the Client Library
Add the XRPay UMD library script tag directly to the header of your HTML checkout page.
Initialize and Redirect
Instantiate XRPay with your key and create a session. Redirect the user to the returned checkout URL.
JavaScript SDK Reference
The client library includes methods for opening checkout sheets, handling popups, and monitoring payment status.
Alternative: Open Checkout in Popup
If you prefer to keep customers on your site, you can launch the checkout session in an overlay popup instead of a redirect.
Real-Time Status Monitoring
Subscribe to checkout session status changes. The callback triggers automatically when payments are validated on-ledger.
Web Components (Elements)
Build responsive, drop-in payment interfaces using framework-agnostic HTML Custom Elements. Includes built-in support for light/dark themes and styling customization.
Custom Custom-Elements Event Hooks
Web components dispatch custom events during checkout lifecycles so you can capture updates in your local application state.
React SDK & Hooks
Integrate natively in React applications using hooks and contextual state providers.
REST API Reference
Base URL: https://xrpay.it/api/v1. Access requires authenticate headers with API keys.
| Method | Endpoint | Auth Scope | Description |
|---|---|---|---|
| POST | /sessions | pk_* or sk_* | Create a checkout session |
| GET | /sessions?id=X | pk_* or sk_* | Retrieve a session |
| GET | /sessions | sk_* | List all sessions (paginated) |
| POST | /webhooks | sk_* | Register a webhook endpoint |
| GET | /webhooks | sk_* | List configured webhooks |
| DELETE | /webhooks?id=X | sk_* | Delete webhook endpoint |
| POST | /webhooks?id=X&test | sk_* | Send test webhook ping |
| GET | /balance | sk_* | Query organization balances |
| GET | /transactions | sk_* | List completed transactions |
| GET | /payment/:id/status | public | Retrieve checkout status |
| GET | /x402 | pk_* or sk_* | x402 protocol information |
| POST | /x402/verify | sk_* | Verify an x402 payment |