Order Webhooks
To receive orders, you must expose two webhook endpoints that Gett can call. These allow us to validate carts in real-time and place confirmed orders into your system.
1. Validation Webhook
Purpose: Called when a user views their cart or proceeds to checkout. It ensures the items are still available and the prices are accurate (including tax/fees).
Request: POST {your_webhook_url}/validate
{
"order": {
"items": [ ... ],
"subTotal": 15.00
},
"user": { ... },
"deliveryAddress": { ... }
}
Response (Success):
Return the Order object, ideally with updated tax, fee, and total amounts calculated by your engine.
{
"amounts": {
"subTotal": 15.00,
"taxes": 1.25,
"fees": 2.00,
"total": 18.25
}
}
Response (Error):
If an item is out of stock, return 400 Bad Request with details.
2. Placement Webhook
Purpose: Called when the payment has been authorized and the order is finalized. This is your signal to inject the order into the POS or Kitchen Display System.
Request: POST {your_webhook_url}/place
The payload is identical to the validation request, but includes a paymentToken if applicable.
Response:
Return the final Order object.
- Important: Include your
partnerOrderId(your internal ID) in the response. We will store this for reference.
Security
Gett will sign every webhook request using a shared secret or include an Authorization header as configured in your integration setup. You should verify this signature before processing any order.