Z Zise Developers 简体中文

exchange.order.executed

Internal exchange executed

When Emitted

Exchange is atomic and irreversible, without intermediate states; execution is its only event. POST /v1/exchange/orders is synchronous and has already executed when 201 is returned. This event is therefore mainly useful when a member exchanges through the App and your server needs to synchronize balances. ⚠ status_version is always 0 because there is no state machine.

Payload

{
  "event_id": "evt_4f8d21b60a9e47c5b370ed81c2a6594f",
  "event_type": "exchange.order.executed",
  "created_at": "2026-08-12T18:02:33Z",
  "merchant_id": "acme",
  "livemode": true,
  "data": {
    "object": "exchange_order",
    "id": "7e13a5c8-62f0-4d91-ae35-0b8c4d7f2916",
    "external_member_id": "u_88123",
    "status": "executed",
    "status_version": 0
  }
}

Payload Fields

FieldTypeDescription
idstringUse this for deduplication. evt_… remains unchanged when the same event is redelivered.
typestringAlways exchange.order.executed
created_atstringTime the event was created (RFC3339), not its delivery time. It is unchanged on redelivery.
data.objectstringObject type; determines which endpoint to query with data.id
data.idstringObject ID; use it to retrieve details.
data.statusstringTreat unrecognized values as unknown and raise an alert; do not fall back to “processing”
data.status_versionnumberMonotonically 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.