Skip to main content
Webhooks are optional but recommended for tracking transaction status in real-time.

Overview

Webhooks allow you to receive automatic notifications when order events occur. Configure them in your Rampnow Partner Dashboard to stay updated on transaction statuses without polling.

Configuration Steps

1

Access API Hub

Navigate to the API Hub in your Rampnow Partner Dashboard.
2

Add Webhook URL

Enter your server endpoint URL that will receive webhook notifications.
Ensure you have a dedicated API endpoint set up on your server to handle incoming webhook events.
3

Select Event Types

Choose which events to receive:
  • All events - Get notified of every status change
  • Specific events - Select only the events you need

Order Events

Each event carries an eventType and the current orderStatus in its payload. Ramp-order events use the ramp_order.status_change type. The concrete status is always in the orderStatus field of the payload — not in the event name.

Order status semantics

The concrete status is in payload.orderStatus. The Webhook column shows which statuses are pushed to your endpoint — the rest are observable only by polling GET /ext/ramp_order/{uid}.
failed is not final. Do not close or refund on your side when you receive failed — Rampnow retries and re-settles. Wait for completed, or poll the order.
Every terminal state now emits a webhook — including expired, canceled and blocked — so you no longer need to poll to observe a terminal failure. completed is immutable once reached.

Implementation Example

Here’s a simple Flask server that receives webhook notifications:
Acknowledge receipt by returning any 2xx status (200–299). The response body is ignored — an empty body is fine, and it does not need to be JSON. Any non-2xx response, or a connection/timeout error, is treated as a failed delivery and retried (see Delivery & retries).

Delivery and retries

  • Success is determined solely by the HTTP status code: any 2xx marks the event delivered. The response body, content type, and length are ignored.
  • Failure is any non-2xx status or a transport error (connection refused, DNS, TLS, timeout).
  • Retries: a failed event is retried up to 10 times with exponential backoff, spanning roughly 24 hours in total. Delivery is idempotent per event — the same eventUid is reused across retries, so de-duplicate on eventUid.
  • No auto-disable: repeated failures never disable your endpoint. After the retry budget is exhausted the event stays in a failed state and can be re-sent manually from the Partner Dashboard.
  • Because a completed order’s webhook carries the final dstFillAmount, transactionHash, and walletAddress, a short outage on your side will not lose those values — they arrive on the next successful retry.

Signature Verification

Every webhook is signed so you can verify it originated from Rampnow. Reject any request whose signature does not match. Algorithm: HMAC-SHA256, hex-encoded. Signing secret: your API secret — the same secret you use to sign outbound API calls (from the API Hub in the Partner Dashboard). There is no separate webhook secret. Signed message — the concatenation, in this exact order:
  • timestamp — the value of the X-RAMPNOW-TIMESTAMP header.
  • path — the path (and query string, if any) of the webhook URL you registered, e.g. /rampnow/webhook.
  • rawBody — the exact raw request body bytes, verified before any JSON re-serialization.
Capture the raw request body for verification. Frameworks that parse and re-serialize JSON can reorder keys or change whitespace, which changes the bytes and breaks the signature.

Webhook Payload Schema

The webhook payload for On/Off Ramp Orders is shown below.

Field Descriptions

Best Practices

  • Use HTTPS endpoints only
  • Always verify the X-RAMPNOW-SIGN signature (see Signature Verification) and reject requests that fail
  • Implement rate limiting on your endpoint
  • Log all incoming webhooks for debugging
  • Return 200 OK quickly (process async if needed)
  • Implement idempotency using orderUid
  • Handle duplicate webhook deliveries gracefully
  • Set up monitoring and alerts for failures
  • Always respond with status codes
  • Implement retry logic on your side if needed
  • Store failed webhooks for manual review
  • Contact support if webhooks stop arriving

Testing Your Webhook

1

Set Up Local Endpoint

Run your webhook server locally on the specified port.
2

Use Tunneling Tool

Use tools like ngrok to expose your local server:
3

Add Tunnel URL

Copy the ngrok URL and add it to your Rampnow dashboard.
4

Create Test Order

Create a test order and verify your endpoint receives the webhook.

Need Help?

If you encounter issues with webhook delivery or have questions about the payload structure, contact us at [email protected].