PayRamHost hosted onboarding is paused · Guides keep updatingGet notified when it reopens →

Docs / Payout webhooks

PayRam payout webhooks: events, signatures and reconciliation

PayRam notifies your server whenever a payout changes status. But payout notifications are retried only three times and never redelivered, so keep a reconciliation fallback.

Last updated · By the PayRamHost editors · Markdown version

PayRamHost hosted merchant onboarding has been paused since 29 November 2026. Where this guide mentions PayRamHost, it describes the situation before the pause; the PayRam usage it explains still applies.

The short version: whenever a payout changes status, PayRam POSTs a JSON event to the HTTPS address you registered, so you do not have to poll. Four points matter: signature verification works exactly as it does for payment webhooks; PayRam sends a payout.ping test request before each delivery, which you must answer with 2xx too; there are only 3 attempts and no redelivery afterwards, so missed notifications have to be reconciled through the query endpoint; and payout.sent is the final success event.

1. Register an endpoint

In the dashboard, register an HTTPS address for the project (the project’s webhook settings) and set it to active. It must be publicly reachable and answer requests with 2xx. PayRam 3.1.1 or later is required.

Which payouts send notifications: every merchant payout, that is, payouts created through the API and payouts created in the dashboard (the full lifecycle for dashboard payouts needs PayRam Core 3.9.0 or later). The created_by field tells them apart: user is an API payout and system is a dashboard payout. Referral payouts do not send notifications.

2. Event types

event_typestatusMeaning
payout.pending-approvalPENDING-APPROVALCreated and held for approval. Sent again when an administrator approves it and the code is awaited
payout.approvedAPPROVEDQueued to send (the API status is pending)
payout.initiatedINITIATEDBroadcast on-chain, with a tx_hash
payout.sentSENTConfirmed on-chain: success, with the final tx_hash
payout.failedFAILEDIt did not go through; see failure_reason
payout.rejectedREJECTEDRejected by an administrator
payout.cancelledCANCELLEDCancelled before sending

Note that there is no payout.pending event and no payout.processed event. Treat payout.sent as the final success event and do not wait for processed.

3. What is in a notification

The body is snake_case JSON and timestamps are Unix seconds. An example:

{
  "event_type": "payout.sent",
  "payout_id": 120,
  "network": "ETH",
  "token": "USDC",
  "amount": "100",
  "amount_usd": "100",
  "email": "test@test.com",
  "address": "0x9F8E7D6C5B4A39281706F5E4D3C2B1A098765432",
  "from_address": "0x21d4cF2E…EA8d45",
  "tx_hash": "0xabc123…def456",
  "status": "SENT",
  "withdrawal_type": "payout_merchant",
  "created_by": "user",
  "currency_type": "token",
  "created_at": 1750340081,
  "updated_at": 1750340282,
  "timestamp": 1750340282,
  "failure_reason": ""
}
FieldMeaning
payout_idThe payout’s ID, the id returned when it was created; use it with the single-payout endpoint
network / tokenThe network code and the coin
amount / amount_usdThe amount in the coin, and its US-dollar value at creation
email / addressThe recipient’s email and wallet address
from_addressThe project hot wallet the payout is sent from
tx_hashThe transaction hash, empty until initiated. It can change while the payout is initiated, so keep the latest one
statusThe status in upper case, as in the table above
withdrawal_typeAlways payout_merchant
created_byuser (API payout) or system (dashboard payout)
currency_typetoken, or coin for a native coin such as ETH, POL or TRX
created_at / updated_at / timestampUnix seconds; timestamp equals updated_at
failure_reasonThe reason on payout.failed and payout.rejected; empty otherwise

4. Verify the signature

Every delivery carries the header X-Payram-Signature: sha256=<hex>, an HMAC-SHA256 of the raw request body keyed with your project API key. For backward compatibility the legacy API-KEY header (your key, verbatim) is also sent. The method is identical to payment webhooks. For full Node.js and Python examples and the most common mistake, re-serialising the JSON, see the webhook guide. The core of it:

const crypto = require('crypto');

function verifyPayramSignature(rawBody, signatureHeader, apiKey) {
  const expected =
    'sha256=' + crypto.createHmac('sha256', apiKey).update(rawBody).digest('hex');
  const a = Buffer.from(signatureHeader || '');
  const b = Buffer.from(expected);
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

With several projects, verify with the key of the matching project; see multiple projects.

5. Delivery rules: a ping first, then three attempts

  • A ping first. Before each delivery PayRam POSTs {"event_type": "payout.ping", ...} to each address. The ping carries the header X-Webhook-Test: true and is signed like every other notification (PayRam Core 3.9.0 and later). You must answer it with 2xx, otherwise that address is skipped for this event.
  • 3 attempts in total: immediately, after 2 seconds and after 4 seconds. A response of 400 or above, or no response within 60 seconds, counts as a failure.
  • No redelivery afterwards. If all 3 attempts fail the notification is lost, and you have to reconcile with the single-payout endpoint. The payout record’s webhookStatus shows the result of the last delivery.
  • Notifications can repeat. Be idempotent: key on payout_id plus status, answer 2xx quickly and process asynchronously.

Unlike payment webhooks: final payment notifications have a much longer retry schedule (see the webhook guide), while payout notifications get only 3 attempts within a few seconds. A short outage of your server can make you miss a payout notification, so always keep a reconciliation fallback for payouts.

6. A handler: idempotency and status updates

app.post('/payram/payout-webhook', express.raw({ type: 'application/json' }), (req, res) => {
  if (!verifyPayramSignature(req.body, req.get('X-Payram-Signature'), API_KEY)) {
    return res.sendStatus(401);
  }
  const event = JSON.parse(req.body.toString('utf8'));

  // connectivity test: sent before every notification, just answer 2xx
  if (event.event_type === 'payout.ping') return res.sendStatus(200);

  res.sendStatus(200);                              // acknowledge first
  applyPayoutEvent(event).catch(console.error);     // then process asynchronously
});

async function applyPayoutEvent(e) {
  // idempotency: handle each payout_id + status only once
  const key = `${e.payout_id}:${e.status}`;
  if (await alreadyProcessed(key)) return;

  switch (e.event_type) {
    case 'payout.sent':
      await markRefundPaid(e.payout_id, e.tx_hash);          // success, store the final hash
      break;
    case 'payout.failed':
      await markRefundFailed(e.payout_id, e.failure_reason); // alert someone to handle it
      break;
    case 'payout.rejected':
    case 'payout.cancelled':
      await markRefundClosed(e.payout_id, e.event_type);
      break;
    default:
      await saveProgress(e.payout_id, e.status, e.tx_hash);  // other states: record progress only
  }
  await rememberProcessed(key);
}

A few recommendations for handling (ours, not official requirements):

  • Only move statuses forward. Notifications can arrive out of order or twice, so never let an earlier status overwrite a later one. sent, failed, rejected and cancelled are final; once reached, do not change them.
  • Have a person look at failures. On payout.failed, read failure_reason first (a common cause is too little hot wallet balance or gas). After fixing it, start again with a new idempotency key, because reusing the old key only returns the failed payout.
  • Keep the latest tx_hash. While initiated the hash can be replaced by a fee bump; the one in sent is final.

7. Reconciling after a missed notification

Because payout notifications are retried only 3 times, we suggest a scheduled job as a safety net:

  1. Find payouts in your own records whose status is not final and that were created more than some time ago (for example 30 minutes).
  2. For each one, call GET /api/v1/withdrawal/{id}/merchant to get the latest status.
  3. If the status is final, update your record with it, using the same logic as the webhook handler (also idempotent).
  4. If a payout stays in pending-approval for a long time, nobody is handling the approval, so remind the approver.

Note that in the pending state, if the hot wallet cannot cover the payout yet, it waits up to 48 hours so that you can top it up, and fails only after that. A payout sitting in the queue is therefore not necessarily a problem; check the hot wallet balance first.

8. FAQ

Do payout and payment webhooks use the same endpoint?

Both kinds of notification go to the active addresses registered for the project. The official documentation does not say whether you can subscribe to only one kind, so we suggest your receiver tells them apart by event_type (payout events start with payout.) and handles them separately.

How do I test this?

Use payout.ping to test connectivity: confirm that your address is publicly reachable, that signature verification passes and that you answer the ping with 2xx. Then run a small real payout through the whole flow; see the go-live checklist.

Do I need to wait for the processed status?

No. processed is PayRam’s internal bookkeeping after sent and has no webhook. When you see payout.sent the money has left.

Can a payout become failed after sent?

No. The official documentation states that a sent payout never becomes failed.

  • Payouts API: Start payouts (refunds, supplier payments) through the PayRam API: request format, converting dollars to coin amounts, limits and approval, the idempotency key you must send, error codes and the retry rule, with a Node.js example.
  • Webhook guide: How to receive PayRam webhooks: register an endpoint, verify X-Payram-Signature, understand retry rules and payment states, handle duplicates, with Node.js and Python examples.
  • Refunds and payouts: On-chain payments have no chargeback, so refunds are manual. How PayRam payouts work: address book, approvals and one-time codes, limits, status meanings, and what to check before you refund.

Sources

This guide is based on the PayRam official documentation below, checked on 2026-11-09. PayRamHost is an independently operated service and is not affiliated with PayRam. If anything differs, the official documentation prevails.