Partners
WebhooksEvent reference

refund.sent

A refund landed on-chain

A cancellation refund has confirmed for this buyer. For checkout refunds, track payment.updated and the refund payment operation instead.

Request Body

application/json
  1. body

Every webhook uses this envelope.

Headers: x-verity-event: <event name> and x-verity-signature: <hex>.

The signature is HMAC-SHA256 of the exact raw body bytes with your webhook secret, hex encoded. Verify before parsing:

import { createHmac, timingSafeEqual } from "node:crypto";function verify(rawBody, header, secret) {  const expected = createHmac("sha256", secret).update(rawBody).digest("hex");  const a = Buffer.from(expected), b = Buffer.from(header ?? "");  return a.length === b.length && timingSafeEqual(a, b);}

Respond 2xx to acknowledge. Non-2xx and timeouts are retried with backoff, so your handler must be idempotent. You only ever receive data about your own buyers.

event*string
Value in"payment.updated""raffle.live""raffle.closed""raffle.drawn""prize.won""raffle.cancelled""refund.sent"
data*

Response Body

Acknowledged.

Example Requests
POST/refund.sent

Every webhook uses this envelope.

Headers: x-verity-event: <event name> and x-verity-signature: <hex>.

The signature is HMAC-SHA256 of the exact raw body bytes with your webhook secret, hex encoded. Verify before parsing:

import { createHmac, timingSafeEqual } from "node:crypto";function verify(rawBody, header, secret) {  const expected = createHmac("sha256", secret).update(rawBody).digest("hex");  const a = Buffer.from(expected), b = Buffer.from(header ?? "");  return a.length === b.length && timingSafeEqual(a, b);}

Respond 2xx to acknowledge. Non-2xx and timeouts are retried with backoff, so your handler must be idempotent. You only ever receive data about your own buyers.

Request Body
application/json
{  "event": "refund.sent",  "data": {    "raffle_id": 77,    "external_user_ref": "usr_8812",    "refund_amount_usd": 250,    "signature": "8sT1mL9pK2wY7nH4gF6xJ5cR3dN8vB6aE9tU4yW7QbZ2"  }}