Skip to content

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

PropertyTypeDescription
idstringThe unique identifier of the coupon
codestringThe unique code used to redeem the coupon
namestringThe name of the coupon
descriptionstringThe description of the coupon
statestringThe current state of the coupon
coupon_typestringThe type of coupon (“fixed_amount” or “percentage”)
amountdecimalThe discount amount or percentage
started_atstringThe 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_atstringThe timestamp when the coupon expires (ISO 8601 format, e.g. “2023-12-04T18:45:44+08:00” or “2023-12-04T10:45:44Z”)
redemption_limitintegerThe maximum number of times the coupon can be redeemed
applied_countintegerThe number of times the coupon has been applied
activebooleanWhether the coupon is active
once_per_userbooleanWhether the coupon can only be used once per user
single_productbooleanWhether the coupon can only be applied to a single product
itemsarraySpecific items the coupon applies to
created_atstringThe 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_atstringThe 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"
}
}