Skip to main content

Remarks

The previous sections describe how to create a webhook. When a trigger invokes a webhook, the ​OpenTicket system makes a POST-request to the application hosted at the endpoint stored with that webhook. This part of the documentation describes several aspects to consider when processing these POST-requests.

Invocation log​

The invocation log stores the invocations of a webhook for up to one week. You can access the invocation log of a specific webhook through webhook dashboard by navigating to the details of that webhook.

Failed requests​

The ​OpenTicket system considers a POST-request to have failed if it receives a response with a 4xx Client Error status code. When a request fails, the ​OpenTicket system will re-attempt to send POST-request until the request is successful or until the maximum number of attempts is reached (three by default). The time between retries doubles after every retry. You can retry all invocations that have not been delivered by clicking the Retry All Failed Invocations button displayed on the invocation log of that webhook.

Nonce​

Every webhook has a unique nonce that is provided in its creation response. The POST-requests sent by the ​OpenTicket system as a result of an invoked webhook will include this in its OpenTicket-Identifier header. These nonces can therefore be used to verify whether requests sent to your application originate from the ​OpenTicket system.

POST /your-path HTTP/1.1
Content-Type: application/json
User-Agent: OpenTicket/Webhook
OpenTicket-Trigger: order.ticket.scanned
OpenTicket-Identifier: 5aK2HMgcUlDCWLuC3KWa
OpenTicket-Dedupe-Key: ba7a36206f413cfcec086e8ad78449b5