/b2b/iframeOrder/doPayment or /b2b/place-order/doPayment call and once the order is processed, WizzGift sends a POST request to the callback_url you provided.
This webhook notifies you about the final order status and, when applicable, refund details and the voucher claim link.
HTTP Method
{your_callback_url}is the URL you passed ascallback_urlin/b2b/place-order/doPayment.
Request Body
Fields
| Field | Type | Required | Description |
|---|---|---|---|
checkoutId | string | Yes | Identifier of the checkout/order. Same value as id returned from /b2b/place-order. |
status | string | Yes | Final status of the order. Possible values: "completed", "failed", "partial". |
meta_data | object | Optional | Custom data you sent in /b2b/place-order/doPayment. Returned exactly as provided so you can correlate with your internal systems. |
link | string | Yes | URL for the customer to claim/redeem the voucher. |
refund_details | object | Yes | Refund information. Empty object {} when there is no refund. Contains refund details on failed or partially failed orders. |
status Values
completed
The order was fully processed and delivered.linkcontains a valid claim URL.refund_detailswill be an empty object{}(no refund).
failed
The order could not be completed.linkmay be absent or not usable.refund_detailswill describe the full refund.
partial
Part of the order was successfully processed and part failed.linkmay give access to the successfully delivered portion.refund_detailswill describe only the refunded amount for failed items.
refund_details Object
When a refund is applied (status = "failed" or status = "partial"), refund_details has the following structure:
| Field | Type | Description |
|---|---|---|
status | string | Status of the refund (e.g., "completed"). |
amount | number | Refunded amount in the used payment currency (for example, in USD or the internal accounting unit). |
paymentMethodId | string | Indicates where the refund was issued. Typically "balance" meaning the amount is refunded to your WizzGift balance. |
Whenstatus = "completed"for the order and there is no refund,refund_detailsis an empty object:{}.
Example Payloads
1. Completed Order (No Refund)
2. Failed Order (Full Refund)
3. Partial Order (Partial Refund)
Recommended Handling on Your Side
- **Verify **
checkoutId
Ensure thecheckoutIdmatches an existing order/check-out in your system. - **Use **
meta_datafor Mapping
Usemeta_datato map the webhook to your internal order, user, or transaction records. - **Check **
status**and **refund_details- If
status = "completed"andrefund_details = {}, mark the order as delivered and allow the customer to claim vialink. - If
status = "failed", mark the order as failed and update the refunded amount usingrefund_details.amount. - If
status = "partial", mark the order as partially completed and adjust balances according torefund_details.amount.
- If