Configure your webhook scenario simulations
Get deeper control when testing your integration flows by configuring webhook simulator scenarios. Use your own data in webhooks, and customize flows by providing specific options to more accurately test your integrations end-to-end.
What's new?
We've released an update to webhook simulator for scenario simulations. You can now:
- Populate simulated webhook payloads with real data by providing entities
- Test a greater variety of common flows for each scenario by selecting from a range of granular options
This lets you more accurately test and optimize your webhook integrations to have increased confidence everything is working as expected before going live.
How it works
You can use webhook simulator to send test webhooks for single events or predefined scenarios as part of testing and integration.
Previously, scenarios played a predefined set of events. Now, you can configure your scenario webhook simulations with entities and options.
Every scenario can be configured with entities and options. Each scenario has its own set list of entities and options you can provide.
Entities
Use entities to populate simulated webhook payloads with your real data.
They map to your existing Paddle entities, such as customers and subscriptions.
Providing existing entities when configuring a scenario simulation populates the payloads of sent webhooks with the details of that entity, but doesn't determine what webhooks are sent in a flow.
12345678910111213141516171819201{
2 "notification_setting_id": "ntfset_01j82d983j814ypzx7m1fw2jpz",
3 "name": "Create a subscription creation simulation with config",
4 "type": "subscription_creation",
5 "config": {
6 "subscription_creation": {
7 "entities": {
8 "customer_id": "ctm_01grnn4zta5a1mf02jjze7y2ys",
9 "address_id": "add_01gm302t81w94gyjpjpqypkzkf",
10 "business_id": "biz_01grrebrzaee2qj2fqqhmcyzaj",
11 "payment_method_id": "paymtd_01hkm9xwqpbbpr1ksmvg3sx3v1",
12 "discount_id": "dsc_01gv5kpg05xp104ek2fmgjwttf",
13 "items": [
14 {
15 "price_id": "pri_01gsz8z1q1n00f12qt82y31smh",
16 "quantity": 5
17 }
18 ]
19 }
20 }
Options
Options determine what flow should occur within specific scenarios, including which webhooks are sent and the details they contain.
These are related to what user actions were taken, or what fields are present on certain entities when the scenario takes place.
For example, you can specify whether a user failed a payment when renewing their subscription, and if that subscription should cancel or pause.
123456789101112131415161{
2 "notification_setting_id": "ntfset_01j82d983j814ypzx7m1fw2jpz",
3 "name": "Create a failed subscription renewal simulation with subscription ID",
4 "type": "subscription_renewal",
5 "config": {
6 "subscription_renewal": {
7 "entities": {
8 "subscription_id": "sub_01h04vsc0qhwtsbsxh3422wjs4"
9 },
10 "options": {
11 "payment_outcome": "failed",
12 "dunning_exhausted_action": "cancel"
13 }
14 }
15 }
16}
Summary of changes
This is a summary of the changes to fields in the Paddle API:
simulation.config | New Field | Provide an object with the field name of the scenario type you wish to configure. Include entities and options within to customise and configure webhook scenario simulations. |
Next steps
This change is available in version 1
of the Paddle API, and in the Paddle dashboard.
It's a non-breaking change, meaning it doesn't impact existing integrations.
We recommend reading more on how to configure simulations, which entities and options are available for each scenario type, and which webhooks are sent based on which configuration options have been selected.