Skip to content

Webhooks

Webhooks let Rach CaaS push real-time event notifications to your server as transfer, deposit, and withdrawal statuses change — eliminating the need to poll the API.

Dashboard endpoints require a JWT Bearer token.
Base URL: https://rach-caas-api-dx75yvdhaq-nw.a.run.app


Managing Webhooks

Create Webhook

Registers a new webhook target URL. Rach will POST event payloads to this URL when state changes occur.

POST /v1/dashboard/webhooks

http
POST /v1/dashboard/webhooks
Authorization: Bearer <jwt>
Content-Type: application/json

{
  "url": "https://your-app.com/webhooks/rach",
  "secret": "whsec_your_signing_secret_here"
}
FieldTypeRequiredDescription
urlstringYour HTTPS endpoint to receive events
secretstringShared secret for HMAC signature verification

List Webhooks

GET /v1/dashboard/webhooks

http
GET /v1/dashboard/webhooks
Authorization: Bearer <jwt>

Delete Webhook

DELETE /v1/dashboard/webhooks/{id}

Deactivates a webhook target permanently.


List Webhook Logs

Returns granular logs of recent HTTP callback attempts, including response codes and retry history.

GET /v1/dashboard/webhooks/logs

http
GET /v1/dashboard/webhooks/logs
Authorization: Bearer <jwt>

Event Types

EventDescription
deposit.settledFiat-to-crypto deposit confirmed on-chain
transfer.queuedERC-4337 UserOp queued
transfer.submittedUserOp submitted to Polygon mempool
transfer.settledTransfer confirmed on-chain
withdrawal.submittedUSDC sweep initiated
withdrawal.crypto_receivedUSDC received by Rach treasury
withdrawal.completedLocal fiat disbursed to customer mobile money

Payload Format

json
{
  "event": "transfer.settled",
  "timestamp": "2026-06-25T12:00:10Z",
  "data": {
    "transfer_id": "txn_abc123",
    "status": "SETTLED",
    "tx_hash": "0xPolygonTxHash...",
    "settled_at": "2026-06-25T12:00:08Z"
  }
}

Signature Verification

Every webhook delivery includes a X-Rach-Signature header. Verify it using your shared secret to ensure the payload is authentic:

javascript
const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expectedSig = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return `sha256=${expectedSig}` === signature;
}

// In your webhook handler:
app.post('/webhooks/rach', (req, res) => {
  const rawBody = req.rawBody; // must be raw bytes
  const sig = req.headers['x-rach-signature'];
  
  if (!verifyWebhook(rawBody, sig, process.env.RACH_WEBHOOK_SECRET)) {
    return res.status(401).send('Invalid signature');
  }
  
  const event = JSON.parse(rawBody);
  // Handle event...
  res.status(200).send('OK');
});

Retry Policy

If your endpoint returns a non-2xx response, Rach will retry delivery with exponential backoff. View all delivery attempts in GET /v1/dashboard/webhooks/logs.

Rach Payments API