Skip to main content
Webhooks allow you to receive real-time notifications about transfer request events. When a status changes, Hashrails sends a POST request to your configured webhook URL with the event details.

Configuration

Configure your webhook URL in the Hashrails Dashboard to start receiving notifications.

Headers

Every webhook request includes the following headers:
HeaderExampleDescription
Content-Typeapplication/jsonPayload content type
x-webhook-eventtransfer_request.completedThe event type
x-webhook-timestamp1761132905Unix timestamp of the delivery
x-webhook-signatureac810d6feefc67c2eb09...HMAC signature for verification
user-agentHashrails-Webhook/1.0Webhook client identifier

Signature Validation

Always validate the webhook signature to ensure the request is from Hashrails and hasn’t been tampered with.
const crypto = require('crypto');

const SECRET = 'your-webhook-secret'; // From the dashboard
const PAYLOAD = '{"event":"transfer_request.completed",...}'; // Raw JSON body

const hash = crypto
  .createHmac('SHA256', SECRET)
  .update(PAYLOAD)
  .digest('hex')
  .toUpperCase();

// Compare with the x-webhook-signature header

Transfer Request Events

The following events are sent throughout the lifecycle of a transfer request. Each event payload includes the full transfer request object.

Event Reference

  • transfer_request.rate.fetching - Hashrails has started sourcing the best exchange rate for the transfer. The rate and destination amount will be 0 at this stage.
  • transfer_request.rate.received - A rate has been determined and is ready for review. The rate.value, rate.expires_at, and destination.amount fields are now populated.
  • transfer_request.rate.expired - The rate expired before it was confirmed. Call the Refresh Quote endpoint to request a new rate.
  • transfer_request.payment.awaiting - The rate has been confirmed and the transfer is awaiting payment. The payment_instructions field is now populated with the details needed to complete payment.
  • transfer_request.payment.received - A payment has been received for this transfer. For split payments, the payments array will contain the received amount.
  • transfer_request.payment.completed - Full payment has been confirmed and the transfer is being processed for settlement.
  • transfer_request.completed - The transfer has been fully settled and funds have been delivered to the recipient. The transaction_hash field is included for crypto settlements.
  • transfer_request.cancelled - The transfer request has been cancelled. No further action will be taken.

Event Payloads

Click on each event below to see the full payload structure.
Sent when Hashrails begins fetching a rate for the transfer request.
{
  "event": "transfer_request.rate.fetching",
  "id": "c17d2777-e604-45e2-b6d5-7743652eadf1",
  "reference": "TXN-2Z82FVYO6BW22RC7",
  "type": "onramp",
  "status": "fetching_rates",
  "source": {
    "amount": 10000,
    "currency": "NGN"
  },
  "destination": {
    "amount": 0,
    "currency": "USDC"
  },
  "rate": {
    "value": 0,
    "expires_at": null
  },
  "payment_instructions": {},
  "events": [
    {
      "status": "pending",
      "timestamp": "2025-12-18T08:27:15.056854Z"
    },
    {
      "status": "fetching_rates",
      "timestamp": "2025-12-18T08:27:15.056869Z"
    }
  ],
  "payments": [],
  "timestamp": 1763559035,
  "webhook_id": "e33ab75e-b319-4422-a640-e1a0263316fd"
}

Payload Fields

FieldTypeDescription
eventstringThe webhook event name
idstringUnique transfer request ID
referencestringHuman-readable transfer reference
typestringTransfer type (onramp or offramp)
statusstringCurrent internal status
sourceobjectSource amount and currency
destinationobjectDestination amount and currency
rateobjectExchange rate and expiry time
payment_instructionsobjectPayment details for completing the transfer
recipientobjectRecipient details (included on completion)
paymentsarrayPayment records received for this transfer
transaction_hashstringBlockchain hash (included on completion for crypto)
timestampnumberUnix timestamp of the event
webhook_idstringUnique identifier for this webhook delivery