Order Webhooks
On every order status change, QI Tech sends a webhook of type insurance.order.status_changed to your webhook URL. The event identifies the order by its order_key and carries the new status.
Receiving webhooks requires a configured webhook URL, and every webhook must have its signature validated. See Configuring webhooks and Webhook validation.
Webhook structure
| Field | Type | Description |
|---|---|---|
webhook_type | string | Always insurance.order.status_changed. |
status | string | The order's new status. |
key | string | The order key (order_key). |
event_datetime | string | Date and time of the event, in UTC, in ISO 8601 format. |
data | object | Event data. See the table below. |
data attributes
| Field | Type | Description |
|---|---|---|
order_key | string | The order key. |
requester_key | string | Your integration's key as a distributor. |
status | string | The order's new status — the same as the outer status field. |
customer_document_number | string | The insured person's document. |
reason | array / string / null | Reason for the change: the list of decline_reasons on rejected, the reason given on cancelled, and 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. |
sequence | integer | Order of the event within the order: the creation event is 1 and each later change has a higher value. Use it to order webhooks that arrive out of order. |
schema_version | integer | Version of the data structure. Currently 1. |
{
"status": "awaiting_payment",
"webhook_type": "insurance.order.status_changed",
"key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"event_datetime": "2026-10-05T15:56:49Z",
"data": {
"order_key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"requester_key": "3f1c9a2e-4b7d-4e0a-9c55-2d8e7f6a1b30",
"status": "awaiting_payment",
"customer_document_number": "96969879003",
"reason": null,
"product_count": 1,
"sequence": 1,
"schema_version": 1
}
}
Events by status
Order created
Sent when the order creation completes successfully. The order awaits payment of the first installment through the Pix payment_artifact returned at creation. Its structure is the one in the example above.
Order rejected
Sent when the order is born rejected at creation because pricing rejected at least one line. The reason field carries the list of decline_reasons, one entry per failure, with the same codes as the quote.
{
"status": "rejected",
"webhook_type": "insurance.order.status_changed",
"key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"event_datetime": "2026-10-05T16:06:22Z",
"data": {
"order_key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"requester_key": "3f1c9a2e-4b7d-4e0a-9c55-2d8e7f6a1b30",
"status": "rejected",
"customer_document_number": "96969879003",
"reason": [
{
"product_key": "8a6f2c1d-3b4e-4f5a-9b8c-7d6e5f4a3b2c",
"code": "OUT_OF_OPTION_SPACE",
"detail": "1f2e3d4c-5b6a-4789-8a7b-6c5d4e3f2a1b: insured_amount: 60000 is outside the offered range 0-50000.0"
}
],
"product_count": 1,
"sequence": 1,
"schema_version": 1
}
}
Order emitted
Sent when payment of the first installment is confirmed and the issuance of the policies is triggered. The product_count field says how many policies will be created — the event does not carry the policy keys, because they are created asynchronously right after. In sandbox, the payment can be simulated. Find the policies with GET /v1/insurance/policies?order_key= or wait for the policy webhooks.
{
"status": "emitted",
"webhook_type": "insurance.order.status_changed",
"key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"event_datetime": "2026-10-05T15:59:34Z",
"data": {
"order_key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"requester_key": "3f1c9a2e-4b7d-4e0a-9c55-2d8e7f6a1b30",
"status": "emitted",
"customer_document_number": "96969879003",
"reason": null,
"product_count": 1,
"sequence": 2,
"schema_version": 1
}
}
Order expired
Sent when the payment deadline (expires_at) passes without confirmation. The deadline is checked every 15 minutes, so the event can arrive up to 15 minutes after it. Expiry never undoes a valid payment: if the payment is confirmed before the expiry is processed, the order is emitted normally and this event does not happen.
{
"status": "expired",
"webhook_type": "insurance.order.status_changed",
"key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"event_datetime": "2026-10-13T00:00:12Z",
"data": {
"order_key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"requester_key": "3f1c9a2e-4b7d-4e0a-9c55-2d8e7f6a1b30",
"status": "expired",
"customer_document_number": "96969879003",
"reason": null,
"product_count": 1,
"sequence": 2,
"schema_version": 1
}
}
Order cancelled
Sent when the cancellation before emission completes. The reason field carries the reason given in the cancellation, or null if none was given.
Cancellation after emission does not produce this event: the order stays emitted and each policy is cancelled, which is notified by the policy webhooks.
{
"status": "cancelled",
"webhook_type": "insurance.order.status_changed",
"key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"event_datetime": "2026-10-05T15:59:20Z",
"data": {
"order_key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"requester_key": "3f1c9a2e-4b7d-4e0a-9c55-2d8e7f6a1b30",
"status": "cancelled",
"customer_document_number": "96969879003",
"reason": "Cliente desistiu da contratação",
"product_count": 1,
"sequence": 2,
"schema_version": 1
}
}
QI Tech webhooks must not be mapped strictly. Additional fields may be included in the webhook payloads returned by our APIs.