Skip to main content
Register your merchant endpoint in the dashboard, then verify every signature before you update local state.
Why this page mattersWebhooks are the main signal that keeps your app in sync with RampHub. If you get this right, the rest of the trade lifecycle is much easier to trust.

Headers

Signing secret

When you register a webhook endpoint in the business dashboard, RampHub generates a signing secret for that endpoint. Treat that secret as a server-side credential for the system that receives the webhook.
  • Store the secret in the receiver’s environment or secret manager.
  • Never put it in a browser bundle or public config file.
  • Copy it when the dashboard reveals it and keep it on the receiving server only.
  • Verify x-ramphub-signature against the raw request body before you trust the payload.
  • Keep using monitor-status as the fallback path when a webhook is delayed or missing.
  • If you rotate the endpoint secret, update the receiving server immediately.

Events

Every status change sends transaction.updated. When the new status is completed or failed, transaction.completed or transaction.failed follows. An order that is cancelled or expired gets transaction.updated only, so read data.status on every delivery rather than waiting for transaction.failed.

Common stage labels

These are the most common labels you will see in the dashboard when a delivery arrives as transaction.updated:
  • Order placed
  • Awaiting settlement
  • Forwarded to provider
  • Awaiting provider funding confirmation
  • Awaiting customer payment
  • Invoice created
  • Settling with provider
  • Ready for settlement
  • Awaiting user payout
  • Marked completed
  • Marked failed

Sample payload

  • data.id is the transactionId returned when you created the order. data.paymentReference is RampHub’s internal reference (RH-TX-…), and data.externalTransactionId is the provider’s own reference when it has one. Match deliveries to your orders on data.id.
  • data.status is the order’s current status. completed, failed, cancelled and expired are final.
  • Amounts are strings.
  • data also carries userId, userBankAccount and metadata. These are RampHub’s internal records: don’t build on their contents, which can change.

Signature verification

Notes

  • Keep the receiver idempotent and persist the delivery id from the headers.
  • A delivery that fails is retried with increasing delays, so the same delivery id can arrive more than once.
  • Deliveries go only to hosts that resolve to public IP addresses. A URL that points at localhost or a private network can be saved, but its deliveries fail.