We send a webhook notification when the order changes to the statuses AUTHORIZED, CANCELED, and EXPIRED.
AUTHORIZED: The order is authorized for payment creation by the merchant.CANCELED: The order was canceled by the consumer.EXPIRED: The order has expired.
Format and Request
The webhook will be triggered via a REST request using the POST method to the URL provided in the webhook_url field during checkout creation, with the following body:
{
"id": "aae11abd-1f51-4854-b58b-473f83b2319f",
"amount": 20000,
"metadata": {
"anyData": "XPTO"
},
"orderReference": "23423hshd3",
"reference": "ASLKDFH28RY2E28938EHFEWJKF",
"state": "AUTHORIZED",
"type": "split"
}Field Description
| Field Name | Type | Description |
|---|---|---|
| id | string | Checkout ID generated by the Pagaleve API /checkouts. |
| amount | number | Order amount in cents, provided during checkout creation in order.amount. |
| metadata | object | Metadata object provided at the time of order creation. |
| orderReference | string | Order ID used by the merchant, provided in the order.reference field during checkout creation. |
| reference | string | Order ID used in the merchant’s sales platform. |
| state | enum | Order status: <br> - **AUTHORIZED** – Authorized, customer confirmed payment of the first installment. <br> - **RELEASED** – Released, returned when the order was released in case the payment was created as an authorization type. <br> - **CANCELED** – Canceled, for orders canceled by user action. <br> - **EXPIRED** – Expired, for expired orders. |
| type | enum | Payment type: <br> - **split** – Installments <br> - **upfront** – One-time payment <br> - **declined** – Declined |
