---
title: "A new coupon code was authored in a project."
method: POST
path: "coupon.created"
tags: ["coupon.* events"]
---

# A new coupon code was authored in a project.

`POST coupon.created` (webhook)

### When this fires

A creator authored a new coupon code over the REST API or via the `create_coupon` MCP tool. Coupons authored in the dashboard or through the bot do not currently emit this event; those surfaces write through the service layer directly.

It fires on **authoring**, not on availability. A coupon created with a future `starts_at` fires this immediately and only becomes redeemable later, so do not read this as "a discount is now live": check `starts_at` and `active`.

> There is no separate event for a coupon becoming redeemable when its `starts_at` passes. Schedule against `starts_at` from this payload if you need that moment.

### Caveats

- **The snapshot carries no redemption counts and no plan restriction.** Counts move independently of the coupon row, and the plan list is a separate relation. Read both from [the coupon endpoint](https://docs.subscriby.net/api/v1/reference/coupons) if you need them.
- **A coupon can be created already switched off.** `active: false` here is legitimate, not a race: a creator can author a code ahead of a campaign and switch it on later, which emits `coupon.activated`.
- **`code` is uppercase regardless of what was typed.** A creator entering `blackfriday` gets `BLACKFRIDAY`. Compare case-sensitively against the uppercase form.
- Timestamps inside `data.coupon` are ISO 8601 **with offset** (`+00:00`), unlike the envelope's `created_at`, which uses `Z`. Both are UTC.

### Related events

- `coupon.updated`: the same snapshot after a change, plus a list of what moved.
- `coupon.activated` / `coupon.deactivated`: availability flips.
- `coupon.redeemed`: a subscriber actually used it.

## Headers

- `SB-Signature` string, required
- `SB-Event-Id` string, required
- `SB-Event-Name` string, required
- `Content-Type` string, required
- `User-Agent` string, required

## Payload

- object: The envelope every event is delivered in.
  - `id` string, required: A ULID unique to the event, prefixed `evt_`. Every retry carries the same id, so it is the key to deduplicate on.
  - `type` 'coupon.created', required: The event name, always `coupon.created` here.
  - `created_at` string, date-time, required: When the event was emitted, server time, ISO 8601.
  - `api_version` string, required: The contract version of the payload shape, `2026-05-01` today. A breaking change to a shape ships under a new version.
  - `project_id` string, uuid, nullable, required: The project the event belongs to; null for team-scoped and billing events.
  - `data` object, required: The event-specific payload. Keys that do not apply to a given emission are omitted rather than sent as null, so check for presence.
    - `coupon` object, required: The coupon snapshot every `coupon.*` lifecycle event carries.
      - `id` string, uuid, required: The coupon's UUID. No prefix; only the envelope `id` is prefixed.
      - `code` string, required: The redeemable string. **Always uppercase**: stored and compared that way.
      - `name` string, required: Creator-facing label. Never shown to subscribers.
      - `discount_type` 'percentage' | 'fixed', required: Whether `discount_value` is a percent or an amount.
      - `discount_value` string, decimal, required: The value exactly as submitted: this event is emitted before the row is read back, so it is `"25"`, not `"25.0000"`. The other lifecycle events re-read the row and carry four decimal places. Parse as a decimal, never a float.
      - `currency_id` string, uuid, nullable, required: `null` on a percentage coupon; set on a fixed-amount one.
      - `duration` string, required: Which charges the discount applies to. Only `once`, the first payment, is authorable.
      - `max_redemptions` integer, nullable, required: Total cap across everyone. `null` means unlimited.
      - `max_redemptions_per_user` integer, required: Per-subscriber cap. Always at least `1`.
      - `minimum_amount` string, decimal, nullable, required: Order floor in the plan's own currency. `null` means no floor. As with `discount_value`, it is the value exactly as submitted here: `"10"`, not `"10.0000"`.
      - `starts_at` string, date-time, nullable, required: When it becomes redeemable. `null` means immediately.
      - `expires_at` string, date-time, nullable, required: When it stops. `null` means it runs until switched off.
      - `active` boolean, required: Whether the creator has it switched on.

## Acknowledgement `2XX`

Your endpoint acknowledged the delivery. Any 2xx status within 30 seconds marks it delivered; the response body is ignored.

## Other responses

- `default`: Any other status, a connection failure, or no answer within 30 seconds counts as a failed attempt. The delivery is retried 8 times, after 10 seconds, 30 seconds, 2 minutes, 10 minutes, 1 hour, 6 hours, 1 day, 3 days; the last failure dead-letters it, and it can be retried from the dashboard or `POST /v1/webhook-deliveries/{delivery}/retry`. After 20 consecutive failures the endpoint is paused until it is resumed.

---

[API](https://skmtc.dev/memberpass/apis/subscriby-rest-api.md) · [All operations](https://skmtc.dev/memberpass/apis/subscriby-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memberpass/apis/subscriby-rest-api/revisions/59c4df91d764?raw)
