Subscribe to notifications for discounts
Subscribe to notifications for discount events to get notified when discounts are created and updated.
What's new?
We added two new events that you can subscribe to:
Occurs when a discount is created.
Occurs when a discount is updated.
How it works
Discounts let you reduce the amount that a customer has to pay by a percentage (e.g. -10%) or fixed amount (e.g. -$10) for an item or transaction.
Paddle now creates events for discounts, meaning you get notifications when a discount is created or updated.
Notifications include the complete discount entity, except discount.times_used
. This field changes frequently, so isn't included in payloads.
Examples
12345678910111213141516171819201{
2 "event_id": "evt_01hv6scz1kqjp8wx6ft1mc3kd2",
3 "event_type": "discount.created",
4 "occurred_at": "2024-04-11T14:36:15.283806Z",
5 "notification_id": "ntf_01hv6scz45nrn82tmkw4ywb71k",
6 "data": {
7 "id": "dsc_01hv6scyf7qdnzcdq01t2y8dx4",
8 "code": "SEWRGPB9WY",
9 "type": "percentage",
10 "recur": true,
11 "amount": "10",
12 "status": "active",
13 "created_at": "2024-04-11T14:36:14.695Z",
14 "expires_at": "2024-12-03T00:00:00Z",
15 "updated_at": "2024-04-11T14:36:14.695Z",
16 "custom_data": null,
17 "description": "Seasonal sale",
18 "import_meta": null,
19 "restrict_to": [],
20 "usage_limit": null,
Next steps
This change is available in version 1
of the Paddle API.
It's a non-breaking change, meaning it doesn't impact existing integrations.
You can create a notification destination for the new discount events by going to Paddle > Developer tools > Notifications, or by using the create a notification destination operation in the Paddle API.