coupon.deleted
A coupon was removed, carrying its final snapshot.
When this fires
A creator deleted a coupon via DELETE /v1/projects/{project}/coupons/{coupon}. Deletions from
the dashboard or the Telegram bot do not currently emit this event — those surfaces write through
the service layer directly.
The payload is a snapshot taken before the delete, so this is your last chance to record what the code was. Read it and store what you need; the code stops resolving at checkout the moment the delete goes through.
The code stops working, the history stays
The coupon row is soft-deleted and its redemption records are left in place —
attribution in your own reporting is not lost. What goes is the code itself:
it stops resolving at checkout immediately. To retire a code while keeping it
visible to creators, use coupon.deactivated instead.
Required ability
project-coupon:view — token must carry this at mint time to subscribe an endpoint to this event.
Payload
{
"id": "evt_01HX...",
"type": "coupon.deleted",
"created_at": "2026-12-04T11:22:47Z",
"api_version": "2026-05-01",
"project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",
"data": {
"coupon": {
"id": "4b9d3e08-a1f6-4275-9c83-7e01d6a2f594",
"code": "BLACKFRIDAY",
"name": "Black Friday 2026",
"discount_type": "percentage",
"discount_value": "25.0000",
"currency_id": null,
"duration": "once",
"max_redemptions": 500,
"max_redemptions_per_user": 1,
"minimum_amount": null,
"starts_at": "2026-11-27T00:00:00+00:00",
"expires_at": "2026-12-01T00:00:00+00:00",
"active": true
}
}
}Field reference
| Field | Type | Notes |
|---|---|---|
data.coupon | object | The same snapshot every coupon.* lifecycle event carries — see coupon.created for each key. It reflects the coupon's state immediately before deletion, so active may well be true. Read back from the database, so discount_value and minimum_amount carry four decimal places here. |
Caveats
- A delete can be refused. If any subscriber holds a live reservation — a checkout in flight with this discount already quoted to a payment provider — Subscriby refuses the delete and asks the creator to switch the code off instead. No event fires in that case, because nothing happened.
- The coupon is soft-deleted, not erased.
GET /v1/projects/{project}/coupons/{coupon}currently still resolves it, because the lookup runs unscoped, so do not use a 404 to detect deletion — treat this event as the authoritative signal and store what you need from this payload. - No counts. As with every lifecycle event, the snapshot omits redemption counts. If you need
a final tally, keep a running total from
coupon.redeemedrather than trying to read one at delete time.
Related events
coupon.deactivated— the non-destructive way to retire a code.coupon.created— the same snapshot shape, at the other end of the life.- Coupon events overview — back to family overview.
How is this guide?