How to Test Webhook Endpoints
This guide will walk you through the process to send webhook event data to a webhook endpoint. To get started you will need the following, both of which can be set up by following our How to Set Up Webhooks Guide:
- a live webhook endpoint ready to receive event data
- a subscription to at least one webhook event in the Atomic Console pointing to your live webhook endpoint; for this guide we will use the "Task Status Updated" event, but you can replace that event with another if you'd like
After completing this guide, you will have a webhook endpoint up and running that is confirmed to be receiving data from Atomic.
Create a test event in Console
One of the ways to test your webhook endpoint is by creating a test event on the Webhooks page on the Atomic Console.
- Go to the Webhooks page on the Atomic Console.
- Confirm that you are on the environment you wish to test (Production or Sandbox).
- Choose the type of event you'd like to send. We suggest choosing "Task Status Updated" as it is an event you're likely to subscribe to in production. It contains status updates and related metadata for tracking your users' conversions with Atomic products.
- Choose the secret to use for hashing the payload signature (see the How to Secure Webhook Endpoints guide for additional details about this signature). If you haven't added additional secrets on the credentials page on the Atomic Console you'll only see a "Default" secret as an option.
- Choose the product to use for the event. The product choice affects the
product
anddata
properties that are included in the event object. - If you chose "Deposit" as your product in the previous step, select the distribution type.
- Click "Send event." Once we receive a response from your webhook endpoint, we will display it in the Console. If the response is not a
2xx
response, we will retry up to 3 times with 30 second intervals between each attempt.
If you see a 2xx
response in the Console, then you're all set! The event was successfully sent and your webhook endpoint responded properly. Note the headers and structure of the request body, all of which are documented on our Webhooks Reference page.
Create an event in Emulator
Another way to test your webhook endpoint is by using the Emulator on the Atomic Console. This will use our Transact SDK and send webhook events as it would with a live application.
- Go to the Emulator page on the Atomic Console.
- Confirm that you are on the environment you wish to test (Production or Sandbox).
- Choose your configuration parameters including the product(s) you want to run, the starting screen, and the language.
- Select or search for an employer. For demo and testing purposes, ADP is a good choice.
- If prompted, say you know your credentials and then enter
test-good
for the username andtest
for the password (really any password will do). - Change or confirm the distribution amount you want to use. Note that this will alter the data sent in your webhook event!
- Once the distribution is confirmed, Transact will begin processing the request and shortly thereafter you will start to see webhook event requests being sent to your endpoint.
At this point you will need to monitor your webhook endpoint to confirm that it is receiving the data and responding accordingly. If you see the data coming through and you respond with a 2xx
response code, then you're good to go!
Create an event in your application
The final way to test webhook endpoints is to test in your own client application, be it an iOS app, Android app, web app, or one of many other platforms. You can follow the steps above in the Create an event in Emulator section starting on step 3.