Skip to main content
Webhooks provide real-time notifications about ramp operations, allowing you to respond immediately to conversion completions, account balance changes, and transaction status updates.

Webhook events for ramps

Grid sends webhooks for key events in the ramp lifecycle:

Conversion events

Sent when a conversion (on-ramp or off-ramp) changes status. Webhook types use the format OUTGOING_PAYMENT.<STATUS> (e.g., OUTGOING_PAYMENT.COMPLETED, OUTGOING_PAYMENT.FAILED, OUTGOING_PAYMENT.REFUND_COMPLETED).
Use this webhook to update your UI, credit customer accounts, and trigger post-conversion workflows. See the Transaction Lifecycle guide for all status transitions and refund handling.

Webhook configuration

Configure your webhook endpoint in the Grid dashboard or via API:
Your webhook endpoint must be publicly accessible over HTTPS and respond within 30 seconds.

Webhook verification

Always verify webhook signatures to ensure authenticity:

Verification steps

1

Extract signature header

Get the X-Grid-Signature header from the webhook request.
2

Get public key

Retrieve the Grid public key from your dashboard (provided during onboarding). javascript const publicKey = process.env.GRID_PUBLIC_KEY;
3

Verify signature

Use the public key to verify the signature against the raw request body.
The signature is created using secp256r1 (P-256) asymmetric cryptography with SHA-256 hashing.

Handling ramp webhooks

On-ramp completion

Handle successful fiat-to-crypto conversions:

Off-ramp completion

Handle successful crypto-to-fiat conversions:

Balance updates

Track crypto deposits for off-ramp liquidity:

Best practices

Handle duplicate webhooks gracefully using webhook IDs:
Transaction IDs are unique identifiers for conversions:
Grid retries failed webhooks with exponential backoff. Ensure your endpoint can handle retries:
Track webhook delivery and processing:

Testing webhooks

Test webhook handling using the test endpoint:
This sends a test webhook to your configured endpoint:
Verify your endpoint receives the test webhook and responds with a 200 status code.

Next steps