> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wizzgift.com/llms.txt
> Use this file to discover all available pages before exploring further.

# B2B order callback

> The optional order callback on the B2B surface.

B2B orders support a simpler notification mechanism than retailer webhooks: pass `callbackUrl` on `POST /b2b/orders` and Wizzgift sends a single plain JSON `POST` when the order reaches a terminal status (`completed`, `partial`, or `failed`).

<Warning>
  This callback is **not signed** and **not retried** — one attempt, fire-and-forget. Unlike retailer webhooks, the payload **contains full fulfillment data including card codes**. If you use it, protect the URL: https only, an unguessable path, and treat inbound payloads as untrusted until you re-fetch the order via the API.
</Warning>

## Payload

```json theme={null}
{
  "checkoutId": "chkb_9f2k1m",
  "status": "completed",
  "items": [
    {
      "id": "itm_1",
      "productId": "prod_amazon_us",
      "productName": "Amazon Gift Card (US)",
      "status": "completed",
      "fulfillments": [
        {
          "index": 0,
          "status": "completed",
          "cardCode": "AQ4X-...-9PLM",
          "cardPin": null,
          "cardUrl": null,
          "fulfilledAt": 1753142400000
        }
      ]
    }
  ],
  "timestamp": 1753142405000
}
```

`errorMessage` fields on failed fulfillments are customer-safe mapped messages, the same as the API returns.

## Recommendations

* **Prefer polling** `GET /b2b/orders/{checkoutId}` for reliability — the callback has no retries, so a transient failure on your side means you miss it entirely. Poll as the source of truth; treat the callback as an optimization that ends polling early.
* **Never rely on the callback's codes alone.** Since it is unsigned, re-fetch the order via the authenticated API before delivering anything.
* **Need reliable, signed notifications?** The retailer surface's [signed webhooks](/webhooks/overview) provide HMAC signatures, retries, and a delivery log.
