Simulate webhooks for single events or scenarios
Make testing and integration easier by using webhook simulator to simulate webhooks for single events or predefined scenarios, like a new subscription or successful renewal.
What's new?
We've released webhook simulator to make testing and integration with Paddle easier. It's available in the dashboard under Paddle > Developer tools > Simulator and in the Paddle API.
How it works
Webhook simulator lets you send test data to your app easily, and includes predefined groups of common scenarios for things like subscription created or subscription renewed.
Notification destinations can now be configured to accept simulated or platform traffic, or both.
Simulated notifications behave similarly to platform notifications, with some small differences to help you handle the two types of traffic correctly.
Examples
Create a simulation
Create a simulation to tell Paddle which event or predefined sequence of events that you want to simulate and where you want to send simulated data.
Â
This example creates a simulation to simulate all events that occur when a subscription is created.
Â
Request123451{ 2 "notification_setting_id": "ntfset_01j82d983j814ypzx7m1fw2jpz", 3 "type": "subscription_creation", 4 "name": "New signup from pricing page" 5}Response123456789101112131415161{ 2 "data": { 3 "id": "ntfsim_01j82zcm3ffc0pyvvb9tjsbvec", 4 "notification_setting_id": "ntfset_01j82d983j814ypzx7m1fw2jpz", 5 "name": "New signup from pricing page", 6 "type": "subscription_creation", 7 "status": "active", 8 "payload": null, 9 "last_run_at": null, 10 "created_at": "2024-09-18T16:28:01.519675Z", 11 "updated_at": "2024-09-18T16:28:01.519675Z" 12 }, 13 "meta": { 14 "request_id": "aafc3dca-ac50-4fc3-a164-4cdda2626cfa" 15 } 16}Run a simulation
Create a run for a simulation to send the event or events that are part of it. Once configured, you can run a simulation as part of testing workflows.
Â
1234567891011121{ 2 "data": { 3 "id": "ntfsimrun_01j82zmt9ejr5h7nd7a6a6henj", 4 "status": "pending", 5 "type": "subscription_creation", 6 "created_at": "2024-09-18T16:32:29.998659Z", 7 "updated_at": "2024-09-18T16:32:29.998659Z" 8 }, 9 "meta": { 10 "request_id": "fb26a99c-2c03-45d8-ba2e-56ffeeaf5f39" 11 } 12}List events for a simulation run
Paddle creates a simulation event for the event or events that are part of a simulation run. You can list events for a simulation run to see which events were simulated and information about responses from the destination server.
Â
12345678910111213141516171819201{ 2 "data": [ 3 { 4 "id": "ntfsimevt_01j82zmtqgpfpphj5236f884tx", 5 "status": "success", 6 "event_type": "transaction.completed", 7 "payload": { 8 "id": "txn_01hv8wptq8987qeep44cyrewp9", 9 "items": [ 10 { 11 "price": { 12 "id": "pri_01gsz8x8sawmvhz1pv30nge1ke", 13 "name": "Monthly (per seat)", 14 "type": "standard", 15 "status": "active", 16 "quantity": { 17 "maximum": 999, 18 "minimum": 1 19 }, 20 "tax_mode": "account_setting",
Summary of changes
Fields
This is a summary of the changes to fields in the Paddle API:
Field | Change | Notes |
---|---|---|
simulation | New entity | Reusable configuration that describes a test case used by webhook simulator. |
simulation_run | New entity | Attempt by Paddle to send simulated events for a simulation. |
simulation_run_event | New entity | Simulated event that happened as part of a notification simulation run. |
notification_setting.traffic_source | New field | Whether Paddle should deliver real platform events, simulation events, or both to this notification destination. |
API operations
This is a summary of new operations:
Next steps
This change is available now in the Paddle dashboard and in the API. It's available in version 1
of the Paddle API.
It's a non-breaking change, meaning it doesn't impact existing integrations.
You can create simulations in the dashboard or using the API to get started with webhook simulator.