Occurs whenever a discount code for a partner is deleted.
This event is also sent when a discount code is removed automatically — for example when a partner is banned or deactivated, a linked referral link is deleted, or a partner is moved to a group without an equivalent discount.
If the discount uses the custom provider, listen to this webhook to disable the corresponding promo code in your own system. For Stripe and Shopify discounts, Dub disables the code in the connected provider automatically.
Response body parameters
All webhook payloads follow a consistent top-level structure with event-specific data nested within the data object.
discount_code.deleted).discount_code.deleted event contains the following parameters:Show object parametersHide object parameters
Unique identifier for the discount code (e.g. dcode_...).
The alphanumeric discount code that was deleted.
ID of the partner this discount code was assigned to.
ID of the partner's referral link this discount code was associated with.
ISO 8601 timestamp when the code was disabled. Set when a partner is banned
or deactivated; otherwise null.
The discount this code belonged to.
Show discount objectHide discount object
Unique identifier for the discount.
Discount amount. For percentage discounts this is the
percent off (e.g. 10 = 10% off). For flat
discounts this is the amount in cents (e.g. 500 = $5.00).
Discount type: percentage or flat.
Maximum duration in months. 0 is one-time,
null is lifetime.
Discount provider: stripe, shopify, or
custom.