Order Webhooks
On every order status transition, QI Tech sends a webhook of type insurance.order.status_changed to the configured callback URL. The event identifies the order by its order_key and carries the new status.
Webhook delivery is best-effort. Do not depend exclusively on them: a lost event is always recoverable by retrieving the order through GET /v1/insurance/order.
Receiving webhooks requires a configured callback URL. See Authentication — Receiving webhooks.
Webhook structure
| Field | Type | Description |
|---|---|---|
webhook_type | string | Always insurance.order.status_changed. |
webhook_datetime | string | Date and time of the event in ISO 8601. |
data | object | Event data. See table below. |
Attributes of data
| Field | Type | Description |
|---|---|---|
order_key | string | Order key. |
status | string | New order status. |
customer_document_number | string | Insured person's document. |
reason | array / string | Reason, when applicable: the decline_reasons list on rejected, the reason given on cancelled. null otherwise — the key is always present. |
product_count | integer | Number of products in the order. On the emitted event, it is the number of policies that will be issued. |
{
"webhook_type": "insurance.order.status_changed",
"webhook_datetime": "2026-07-16T14:03:22Z",
"data": {
"order_key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"status": "status",
"customer_document_number": "96969879003",
"reason": null
}
}
Events per status
Order created
Sent when the submission completes successfully. The order awaits the first installment payment through the Pix payment_artifact returned on order creation.
Order rejected
Sent when the order is born rejected at submission because pricing refused at least one line. The reason field carries the decline_reasons list.
Order emitted
Sent when payment is confirmed and policy issuance is dispatched. The product_count field states how many policies will be created — the event does not carry the policy keys, because they are issued asynchronously right afterwards. Discover them with GET /v1/insurance/policies?order_key= or wait for the policy webhooks.
{
"webhook_type": "insurance.order.status_changed",
"webhook_datetime": "2026-07-16T14:03:22Z",
"data": {
"order_key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"status": "emitted",
"customer_document_number": "96969879003",
"reason": null,
"product_count": 2
}
}
Order expired
Sent when the payment deadline (expires_at) elapses without confirmation. Expiry never undoes a valid payment: if payment is confirmed before expiry is processed, the order is emitted normally and this event does not occur.
Order cancelled
Sent when a pre-emission cancellation completes. The reason field carries the reason given on the cancellation, when there is one. A post-emission cancellation does not emit this event — the order stays emitted and tracking happens through the policy webhooks.
QI Tech webhooks must not be mapped strictly. Additional fields may be added to the webhook payloads returned by our APIs.