Simulate webhooks
Use webhook simulator to send test webhooks for single events or predefined scenarios as part of testing and integration.
You can use webhooks to handle provisioning and fulfilment, and to keep your app in sync with Paddle. For example, you can create an account for a customer in your app when a subscription is created in Paddle and limit customer access to your app if they cancel.
Webhook simulator lets you send test webhooks for single events or scenarios, so you can more easily build and test workflows to keep your app in sync with Paddle.
How it works
You can use webhooks to keep your app in sync with Paddle. For example, you can subscribe to subscription.paused
to determine when a subscription pauses and take action in your app, like limiting customer access until resumed.
Key subscription lifecycle events typically involve multiple webhooks. For example, when a customer signs up using a checkout, Paddle creates and updates multiple entities throughout the process — a customer, address, and business to hold customer information; a transaction to collect for payment; and finally a subscription when checkout completes.
To make it easier to test and integrate, webhook simulator lets you send single events or predefined groups of events, called scenarios, without going through the steps to make them occur yourself.
Simulation lifecycle
Create a simulation
You can create and configure a simulation to tell Paddle which event or predefined sequence of events that you want to simulate and where you want to send data to. Once configured, you can run a simulation any time to send simulated data.
Run your simulation
Once you've created a simulation, you can run it to send the event or events that are part of it. Paddle creates a simulation run entity for the run to hold information about the events simulated.
Work with simulated events
Paddle sends simulated webhooks for the event or events that are part of the simulation, creating a simulation run event entity for each event sent. You can list events for a simulation run to see which events were simulated and information about responses from the destination server.
Simulations are reusable configurations. Once you've created and configured a simulation, you can run it any time you like as part of your testing workflows.
Create a simulation
Go to Paddle > Developer tools > Simulations.
Click New simulation.
Choose where to send simulated events using the Destination dropdown box. You can create a new notification destination if you don't already have one.
Enter a descriptive name for your simulation. You can customize payloads to send specific data, so a descriptive name helps you to identify this simulation.
Click the Single event or Scenario tab, then choose the simulated data you want to receive.
Click Create when you're done.
Only destinations with the traffic source
simulation
orall
are shown in the list of destinations.platform
destinations can only receive traffic for real events to avoid sending simulated data to production endpoints.
Run a simulation
Go to Paddle > Developer tools > Simulations.
Find your simulation in the list, then click the ... action menu and choose View. If you haven't already created a simulation, create one instead.
Click Run simulation to run your simulation. If you've already run your simulation before, click Replay to run it again.
Use the Payload, Request, and Response tabs to work with simulated events.
You can verify signatures for your simulation to check that events are genuinely sent by Paddle. Click View more to reveal your webhook secret key.
Customize a simulation payload
You can customize the payload for a single event simulation to send specific data as part of your request. Paddle saves your simulated data, so you can use it in the future.
You can only customize payloads for single event simulations. You can't customize payloads for scenarios right now.
Go to Paddle > Developer tools > Simulations.
Find your simulation in the list, then click the ... action menu and choose View. If you haven't already created a simulation, create one instead.
If you haven't run your simulation before, run it.
Click the Payload tab in the preview pane, then click the payload to start editing.
Click Replay to run your simulation with the customized payload.
Paddle checks the data you enter is valid JSON and that values for fields are the correct type. However, you may still enter incorrect data, like passing transaction totals that don't add up correctly.
Work with simulated events
Paddle creates a simulation run event for the event or events that are part of a simulation.
Go to Paddle > Developer tools > Simulations.
Find your simulation in the list, then click the ... action menu and choose View. If you haven't already created a simulation, create one instead.
If you haven't run your simulation before, run it.
Inspect the Payload, Request, and Response using the tabs in the preview pane. If you're working with a scenario, click the events on the left to see information about a single event sent as part of this scenario.
Payload | The simulated data sent by Paddle. Returned by the data object in simulated events. |
Request | The complete simulated event request sent by Paddle. Includes simulated fields for the event, like occurred_at and event_id . |
Response | The status code and body of the response received from the destination server. May be blank where a body isn't returned. |