Orders - Sample Payload
Sample payload for Orders
Order creation is an important step as it helps you associate every payment with an order, thus preventing multiple payments. Orders and payments go hand-in-hand. Once a payment is captured, the order is marked paid. This is reflected in the order.paid
and payment.captured
webhook events as well. These events are triggered when the payment associated with the order is captured.
order.paid Webhook Event | payment.captured Webhook Event |
---|---|
You must integrate with the Orders API and pass the order_id parameter in Checkout to trigger this event. | You do not have to integrate with the Orders API to trigger this event. |
This payload contains the payment and order entities. Thus, order and payment information are available in the same payload. | This payload contains the payment entity. Hence, only payment details are available. |
The table below lists the Webhook events available for orders.
Webhook Event | Description |
---|---|
order.paid | Triggered when an order is successfully paid. |
Watch Out!
If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to signature mismatch.
Do Not Parse or Cast the Webhook Request Body
While generating a signature at your end, ensure that the webhook body is passed as an argument in the raw webhook request body. Do not parse or cast the webhook request body.
Was this page helpful?