ThriveCart supports the delivery of webhook notifications on certain events. Currently, only the order.success event is supported and in future we will add notifications for recurring billing, refunds, cancellations etc.
We will send an HTTP POST request to the target URL(s) that you have set up under Settings -> Webhooks. You can act on this POST and run actions such as integrations with third-party platforms, send yourself or the customer further emails, etc.
Setting up a webhook
Your webhook must be accessible via the internet, and must return an 2xx HTTP status code when we ping it. You can create up to 5 webhooks in total; if you require more, you can get in touch with us and request raising this limit. Sign in to your ThriveCart account, click on Settings at the top, navigate down to Webhooks and provide the name of the hook (for your reference in future) and the URL to POST to. We will ping the URL and check that it is functioning, and then add it. Once added, it will become immediately active.
Verifying the webhook
As part of the parameters that we provide, we include a thrivecart_secret parameter. This is a string which will match up with the 'Secret word' that can be found under Settings -> ThriveCart API. You should hard-code this at your end and ensure that it matches up with what we provide to ensure nobody else is posting to your URL.
We include the following parameters in our notifications. Note that any and all keys representing prices are in hundreds. So if a customer was charged $14.99, we would provide you with 1499. You can divide these integers by 100 to get the amount in dollars and cents.
As well as the 'order.success' event, we also provide the following:
Further, detailed API documentation is coming soon.