Skip to main content
Occurs whenever a discount code is created for a partner.
This event is sent when a discount code is created via the API, the dashboard, or auto-provisioning when a partner joins a group.If the discount uses the custom provider, listen to this webhook to create the corresponding promo code in your own system. For Stripe and Shopify discounts, Dub creates 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.

string
The event ID.
string
The event type that triggered the webhook (e.g., discount_code.created).
string
ISO 8601 timestamp when the webhook event was created.
object
Event-specific data containing detailed information about the event. The data object for the discount_code.created event contains the following parameters: