Overview
Chainrails webhooks allow you to receive real-time notifications for both cross-chain intents and ramp orders. Instead of polling the API for status updates, webhooks push event data to your server when significant state changes occur.Quick Start
1. Create a Webhook
You’d rarely need to do this manually, as you can create webhooks directly from the Dashboard. But if you want to create one programmatically, here’s how:secret value - it’s only returned once when creating or regenerating the webhook. You’ll need it to verify webhook signatures.
2. Implement Your Webhook Endpoint
Your webhook endpoint must:- Accept
POSTrequests - Respond with
200 OKwithin 5 seconds - Verify the signature (instructions below)
- Be publicly accessible (HTTPS required for live webhooks)
Event Types
Subscribe to the events relevant to your use case:Intent Events
Ramp Order Events
Ramp webhooks expose a provider-agnostic lifecycle. Provider-specific intermediate statuses are normalized into the event set above.
Webhook Payload Structure
All webhook events follow this structure:Ramp Event Example
Ramp events follow the same top-level shape, but with ramp order fields indata:
Field Descriptions
id: Unique identifier for this webhook event (idempotency key)type: One of the event typescreated_at: When the event occurred (UTC, ISO 8601)data: Event-specific payload (intent fields for intent events, ramp fields for ramp events)previous_attributes: What changed (only for update events)
Ramp Data Fields
ramp_order_id: Internal ramp order IDorder_ref: Client-facing order referenceramp_direction:on-ramporoff-rampramp_status: Current normalized ramp statusfiat_currency: Fiat currency code (ISO 4217)fiat_amount: Fiat amount for the ordercrypto_amount: Crypto amount involved in the ordercrypto_currency: Crypto asset symbol (for exampleUSDC)payment_channel: Payment channel used by the providerramp_provider: Provider handling the orderintent_address: Linked intent address (when available)
Security & Signature Verification
All webhook payloads are signed using HMAC-SHA256. Always verify signatures to ensure the webhook came from Chainrails.How Signing Works
- Chainrails generates a signature using your webhook secret
- Signature is sent in the
X-Chainrails-Signatureheader - Timestamp is sent in the
X-Chainrails-Timestampheader - You verify the signature matches what you compute
Signature Format
The signature is computed as:Verification Example (Node.js)
Delivery & Retries
Delivery Behavior
- Timeout: Webhooks must respond within 5 seconds
- Success: Any
2xxstatus code (200, 201, 204, etc.) - Failure: Timeouts, network errors, or non-2xx responses
- Retries: Automatic retry with exponential backoff
Retry Schedule
Failed deliveries are automatically retried:
After 7 attempts, the delivery is marked as permanently failed.

