This guide will walk you through the steps to track API Callback Requests for Debugging Purposes.
If something is not working correctly on your website “for no apparent reason”, it is a Best Practice to debug API Callback requests.
To do that we’ll use a tool called RequestBin, which is very simple to use.
You can set it all up in less than 5 minutes.
I. Getting Started
1. Visit https://requestbin.com
2. Press Create a Request Bin
3. Copy the Bin URL to your Clipboard. If you need to create private and nameable endpoints, click to sign in with Google or Github.
4. Make sure to save the URL or sign in and save the endpoint so you can recover it later.
5. Anytime an API Callback is executed, or when someone visits the URL, Request Data is being tracked. This data is For Developers and helps them analyze where an issue occurs.
6. Understand that these RequestBin URLs should be always treated as temporary and shouldn’t be left inside your API Callbacks. Depending on what time of data you want to track, these should be left for a maximum of 1 hour to 1 day and, in very rare cases, up to 30 days.
7. Add that URL to the API Callback that we require details about. NOTE! If you’re using ThriveCart, scroll to section II.
II. Debugging ThriveCart API Callbacks.
1. Login to your ThriveCart Account.
2. Visit the ThriveCart Settings Page & Press View on API & webhooks
3. Press View Settings on Webhooks & notifications
4. Press Add another webhook
5. Complete the details
- The Name should be something Temporary, i.e RequestBin Testing
- The RequestBIN URL ( created earlier ) in the Webhook URL ( not the one from the screenshot )
- Save this webhook
6. Now wait. If ThriveCart did an API Callback Request to your website, it also sends it in this RequestBin URL.
7. After you’ve collected some data ( you can also make test purchases & etc ), make sure to remove it from the Active Webhooks