Coupon Created
Coming Soon: The
coupon.created
webhook event is planned for future release and is not yet available.
The coupon.created
event will be triggered when a new coupon is created in the system.
Event Properties
Property | Type | Description |
---|---|---|
id | string | The unique identifier of the coupon |
code | string | The unique code used to redeem the coupon |
name | string | The name of the coupon |
description | string | The description of the coupon |
state | string | The current state of the coupon |
coupon_type | string | The type of coupon (“fixed_amount” or “percentage”) |
amount | decimal | The discount amount or percentage |
started_at | string | The timestamp when the coupon becomes valid (ISO 8601 format, e.g. “2023-12-04T18:45:44+08:00” or “2023-12-04T10:45:44Z”) |
expired_at | string | The timestamp when the coupon expires (ISO 8601 format, e.g. “2023-12-04T18:45:44+08:00” or “2023-12-04T10:45:44Z”) |
redemption_limit | integer | The maximum number of times the coupon can be redeemed |
applied_count | integer | The number of times the coupon has been applied |
active | boolean | Whether the coupon is active |
once_per_user | boolean | Whether the coupon can only be used once per user |
single_product | boolean | Whether the coupon can only be applied to a single product |
items | array | Specific items the coupon applies to |
created_at | string | The timestamp when the coupon was created (ISO 8601 format, e.g. “2023-12-04T18:45:44+08:00” or “2023-12-04T10:45:44Z”) |
updated_at | string | The timestamp when the coupon was last updated (ISO 8601 format, e.g. “2023-12-04T18:45:44+08:00” or “2023-12-04T10:45:44Z”) |
Example Payload
{ "type": "coupon.created", "data": { "id": "550e8400-e29b-41d4-a716-446655440001", "code": "SUMMER2023", "name": "Summer Discount", "description": "Special discount for summer courses", "state": "active", "coupon_type": "percentage", "amount": 20.0, "started_at": "2023-06-01T00:00:00Z", "expired_at": "2023-08-31T23:59:59Z", "redemption_limit": 100, "applied_count": 0, "active": true, "once_per_user": true, "single_product": false, "items": ["course-123", "course-456"], "created_at": "2023-05-15T14:30:00Z", "updated_at": "2023-05-15T14:30:00Z" }}