What's new?
We added two new events that you can subscribe to:
discount.created
Occurs when a discount is created.discount.updated
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
{ "event_id": "evt_01hv6scz1kqjp8wx6ft1mc3kd2", "event_type": "discount.created", "occurred_at": "2024-04-11T14:36:15.283806Z", "notification_id": "ntf_01hv6scz45nrn82tmkw4ywb71k", "data": { "id": "dsc_01hv6scyf7qdnzcdq01t2y8dx4", "description": "All orders (10% off)", "code": "BF10OFF", "type": "percentage", "amount": "10", "currency_code": "USD", "mode": "standard", "status": "active", "discount_group_id": "dsg_01js2gqehzccfkywgx1jk2mtsp", "recur": true, "maximum_recurring_intervals": 3, "usage_limit": null, "restrict_to": [], "enabled_for_checkout": true, "expires_at": "2024-12-03T00:00:00Z", "created_at": "2024-04-11T14:36:14.695Z", "updated_at": "2024-04-11T14:36:14.695Z", "custom_data": null, "import_meta": 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.