Checkout SDK
The @volr/checkout-sdk is a server-side TypeScript SDK for creating and managing stablecoin checkout payments via the Volr API.
Overview
The SDK wraps the Volr Checkout API with type-safe methods, automatic error handling, and webhook signature verification. Use it in your Node.js backend to:
- Create checkouts — Generate payment sessions with token amount or fiat pricing
- Manage checkouts — List, retrieve, and cancel checkout sessions
- Process refunds — Create and track refund requests
- Verify webhooks — Validate incoming webhook signatures (HMAC-SHA256)
Architecture
Your server communicates with Volr through the SDK. Customers interact with the hosted checkout page. Payment confirmation happens on-chain, and you receive webhook notifications.
Quick Example
import { VolrCheckout } from '@volr/checkout-sdk';
const volr = new VolrCheckout({
serverKey: process.env.VOLR_SERVER_KEY!,
});
// Create a checkout
const checkout = await volr.create({
chainId: 8453,
tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
merchantAddress: '0xYOUR_WALLET',
fiatAmount: '25.00',
fiatCurrency: 'USD',
itemName: 'Premium Plan',
referenceId: 'order_123',
});
// Share checkout URL with customer
const url = `https://checkout.volr.io/${checkout.id}`;
Supported Chains & Tokens
| Chain | Chain ID | Tokens |
|---|---|---|
| Base | 8453 | USDC, USDT |
| Polygon | 137 | USDC, USDT |
| Arbitrum | 42161 | USDC |
Next Steps
- Installation — Install and configure the SDK
- Create Checkout — Create your first checkout
- Webhooks — Handle payment notifications
- Refunds — Process refunds