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.
{
"id": "evt_KleiO4HBwZFbO1vZLWIPZ2AtX",
"event": "discount_code.created",
"createdAt": "2026-08-19T10:48:15.468Z",
"data": {
"id": "dcode_1K39DGZG3MHY9RP4PD0AS2C5P",
"code": "STEVEN10OFF",
"partnerId": "pn_1K9BZE1K285BSTX4W6MPKXJFZ",
"linkId": "link_5myDHLqhIQvUmUPjchVygF9R",
"disabledAt": null,
"discount": {
"id": "disc_1KEC01MXC5H50XQMSN83VCW65",
"amount": 10,
"type": "percentage",
"maxDuration": 6,
"provider": "custom"
}
}
}