qrpay.order.failed
QR payment unsuccessful; the full debit returned to the available balance
When Emitted
Upstream rejection, unavailable corridors, and expired quotes can all lead here: failure is not an exceptional path. Without this event, polling is your only way to know, and polling requires knowing that an order exists. Otherwise you would wait for a completed event that never arrives.
Payload
{
"event_id": "evt_af02e71d94b6435c8071cd23e6b95f4a",
"event_type": "qrpay.order.failed",
"created_at": "2026-08-12T15:09:03Z",
"merchant_id": "acme",
"livemode": true,
"data": {
"object": "qrpay_order",
"id": "6d3f9b21-8c07-4a5e-91d4-27e0b6a3fc58",
"external_member_id": "u_88123",
"status": "failed",
"status_version": 3
}
}
Payload Fields
| Field | Type | Description |
|---|---|---|
id | string | Use this for deduplication. evt_… remains unchanged when the same event is redelivered. |
type | string | Always qrpay.order.failed |
created_at | string | Time the event was created (RFC3339), not its delivery time. It is unchanged on redelivery. |
data.object | string | Object type; determines which endpoint to query with data.id |
data.id | string | Object ID; use it to retrieve details. |
data.status | string | Treat unrecognized values as unknown and raise an alert; do not fall back to “processing” |
data.status_version | number | Monotonically increasing; use it to discard older states that arrive late. |
Signature Verification and Deduplication
Verify the signature against the raw request body bytes. Do not parse and reserialize the JSON: your JSON library may change key order or whitespace, which changes the signature and can look like a key configuration error.
// Node · Run before parsing JSON
const raw = await readRawBody(req); // Buffer / string; do not use parsed req.body
const expect = crypto.createHmac("sha256", WEBHOOK_SECRET).update(raw).digest("hex");
const got = req.headers["z-signature"]; // Format: t=<unix>,v1=<hex>
if (!timingSafeEqual(expect, parseV1(got))) return res.status(400).end();
// Deduplicate using the envelope id, not data.id
if (await seen(JSON.parse(raw).id)) return res.status(200).end();
For the full procedure, including timestamp tolerance and redelivery semantics, see Webhook Guide.