Quick Start
Create your first stablecoin checkout in 5 minutes.
1. Install & Initialize
npx create-volr
This runs the setup wizard:
- Sign in with email (OTP)
- Connect your receiver wallet
- Create a project
- Select accepted tokens (USDC, USDT, etc.)
After setup, you'll have a VOLR_SERVER_KEY in your .env file.
AI IDE Integration
Use these prompts with your AI coding assistant for fast, guided integration.
- Claude Code
- Cursor
- Codex
- Windsurf
Help me integrate Volr Checkout for stablecoin payments into my server.
Context:
- Package: @volr/checkout-sdk
- Docs: https://docs.volr.io/checkout-sdk/intro
- I need to: create checkouts, handle webhooks, process refunds
Requirements:
1. Install @volr/checkout-sdk
2. Create a checkout endpoint (POST /api/checkout)
3. Set up webhook handler (POST /api/webhooks/volr)
4. Verify webhook signatures with HMAC-SHA256
5. Handle checkout.paid and checkout.expired events
Please explore my codebase first, then implement step by step.
# Volr Checkout Integration
I need to integrate Volr stablecoin checkout payments.
## Project Context
- Server-side integration using @volr/checkout-sdk
- Docs: https://docs.volr.io/checkout-sdk/intro
## Requirements
1. Install @volr/checkout-sdk
2. Create checkout endpoint with amount, token, and chain
3. Handle webhook notifications (checkout.paid, checkout.expired)
4. Verify webhook signatures (HMAC-SHA256, X-Volr-Signature header)
5. Store checkout references for order reconciliation
## Important
- Use Server API Key (volr_server_...) — never expose in client code
- Webhook secret is separate from server key
- Test with Base Sepolia before production
# Volr Checkout Integration
Context: Adding stablecoin payments via @volr/checkout-sdk
Docs: https://docs.volr.io/checkout-sdk/intro
Tasks:
1. Install @volr/checkout-sdk
2. Create checkout creation endpoint
3. Implement webhook handler with signature verification
4. Handle payment lifecycle events
5. Test with Base Sepolia
Constraints:
- Server-side only (never expose server key to client)
- Verify all webhook signatures before processing
- Use referenceId for order reconciliation
Help me add Volr stablecoin checkout to my application.
Package: @volr/checkout-sdk (npm install @volr/checkout-sdk)
Docs: https://docs.volr.io/checkout-sdk/intro
I need:
1. Checkout creation endpoint
2. Webhook handler with HMAC signature verification
3. Payment event processing (paid, expired, cancelled)
Key details:
- Auth: X-API-Key header with server key (volr_server_...)
- Webhooks: X-Volr-Signature header, HMAC-SHA256
- Supported chains: Base (8453), Polygon (137), Arbitrum (42161)
Installation
Install the Volr Checkout SDK:
- npm
- yarn
- pnpm
npm install @volr/checkout-sdk
yarn add @volr/checkout-sdk
pnpm add @volr/checkout-sdk
Create a Checkout
import { VolrCheckout } from '@volr/checkout-sdk';
const volr = new VolrCheckout({
serverKey: process.env.VOLR_SERVER_KEY!,
});
// Create a checkout — customer selects token on the checkout page
const checkout = await volr.create({
fiatAmount: '10.00',
fiatCurrency: 'USD',
itemName: 'Premium Plan',
referenceId: 'order_123', // Your order ID
successUrl: 'https://yoursite.com/success',
cancelUrl: 'https://yoursite.com/cancel',
});
// Redirect customer to the checkout page
// Customer will choose their preferred stablecoin and chain
const checkoutUrl = `https://checkout.volr.io/c/${checkout.id}`;
Handle Webhooks
import { VolrCheckout, type WebhookPayload } from '@volr/checkout-sdk';
// Express.js example
app.post('/webhooks/volr', express.raw({ type: 'application/json' }), async (req, res) => {
const signature = req.headers['x-volr-signature'] as string;
const payload = req.body.toString();
// Verify signature
const isValid = await VolrCheckout.verifySignature(
payload,
signature,
process.env.VOLR_WEBHOOK_SECRET!,
);
if (!isValid) {
return res.status(401).send('Invalid signature');
}
const event: WebhookPayload = JSON.parse(payload);
switch (event.event) {
case 'checkout.paid':
await fulfillOrder(event.data.referenceId!);
break;
case 'checkout.expired':
await releaseInventory(event.data.referenceId!);
break;
}
res.status(200).send('OK');
});
Test Your Integration
Use the Volr CLI to verify your setup:
npx create-volr # If you haven't already set up
volr checkout doctor # Check configuration
volr checkout create-test # Create test checkout on Base Sepolia
Next Steps
- Checkout SDK Reference — Full SDK documentation
- Webhooks Guide — Webhook events and best practices
- Refunds — Process refunds
- Code Examples — curl and SDK examples