Everything you need to integrate Toreador into your application.
Complete HTTP API reference for generating QR codes and creating payment sessions.
The official @toreador/sdk for Node.js, Deno, and edge runtimes.
HMAC-SHA256-signed HTTPS notifications when your sessions change state.
All API requests require a Pro plan API key. Include it in the X-API-Key header.
https://toreador.io/api/v1/public
Generates a QR code image as base64 for native tokens, along with session details.
_meta block with tier and counters.
| token* | string — BTC, ETH, SOL, POL, USDC (Solana) |
| chainId* | string — bitcoin, ethereum, solana, polygon, base |
| amount* | string — Amount in token unit (e.g. "0.001") |
| recipientAddress* | string — Destination wallet address |
Creates a data session for EVM tokens (USDC, USDT) or DApp integrations.
| token* | string — USDC, USDT, EURC |
| chainId* | string — ethereum, polygon, base |
| amount* | string — Amount in token unit (e.g. "50") |
| recipientAddress* | string — Destination wallet address |
Retrieves the current status of an EVM payment session (created via /create-session).
| id* | string — The session ID returned by /create-session |
Possible statuses: pending, submitted, confirming, completed, expired, failed.
Lists your 50 most recent QR code generations (created via /generate-qr).
Lists your 50 most recent EVM payment sessions (created via /create-session).
| Token | Chains | Method |
|---|---|---|
| BTC | bitcoin | generate-qr |
| ETH | ethereum, polygon, base | generate-qr |
| SOL | solana | generate-qr |
| POL | polygon | generate-qr |
| USDC | ethereum, polygon, base, solana | create-session / generate-qr (Solana) |
| USDT | ethereum, polygon, base | create-session |
| EURC | ethereum, base | create-session |
The official @toreador/sdk provides a type-safe TypeScript interface for the Toreador API. Compatible with Node.js 18+, Deno, and modern browsers.
npm install @toreador/sdk
client.qrcode.generate(params)
Generate a QR code for native tokens (BTC, ETH, SOL, POL) or Solana SPL tokens.
Returns: { success, type, qrData, qrCodeURL, token, chain, amount, recipientAddress }
client.qrcode.history()
List your last 50 QR code generations.
Returns: { payments: PaymentRecord[] }
client.sessions.create(params)
Create a payment session for non-native EVM tokens (USDC, USDT, EURC).
Returns: { sessionId, url, expiresIn, ... }
client.sessions.list()
List your last 50 payment sessions.
Returns: { sessions: SessionRecord[] }
client.sessions.getStatus(sessionId)
Check the status of a payment session.
Returns: { status: 'pending' | 'submitted' | 'confirming' | 'completed' | 'expired' | 'failed', ... }
| Option | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Yes | Your API key (tdr_xxxx) |
| baseURL | string | No | API base URL. Defaults to https://toreador.io/api/v1/public |
| fetch | function | No | Custom fetch implementation. Defaults to globalThis.fetch |
Receive HMAC-SHA256-signed events in real time when your sessions change state. Configure endpoints from your dashboard.
| Event | Trigger |
|---|---|
| session.created | When /create-session succeeds |
| session.submitted | Payer has broadcast the transaction |
| session.confirming | First on-chain confirmation |
| session.completed | Required confirmations reached |
| session.expired | 15-minute expiry passed |
| session.failed | Transaction failed on-chain |
Every delivery includes a Toreador-Signature: t=<unix>,v1=<hex> header. The signature is HMAC-SHA256 over <timestamp>.<rawBody> with your endpoint secret. Always verify the signature before processing the event.
| Toreador-Signature | t=1761123121,v1=0xabc... |
| Toreador-Event-Id | evt_xxx — consumer-side idempotency |
| Toreador-Event-Type | session.completed |
| Toreador-Delivery-Id | whd_xxx |
| Toreador-Attempt | attempt number (1, 2, 3, ...) |
If your endpoint returns non-2xx or does not respond within 10 seconds, Toreador retries with exponential backoff: 0s, 5s, 5min, 30min, 2h, 5h, 10h, 24h, 48h (9 attempts total over ~3 days), then status failed. An endpoint is auto-disabled after 50 consecutive failures.
Deliveries can be manually retried from the dashboard. Consumer-side idempotency: use the Toreador-Event-Id header to detect duplicates.
Create a Pro account to get your API key and start integrating Toreador.
Go Pro