onCouponUsed
Purpose
Triggered when a coupon is used in a purchase. Use this hook to track coupon usage and measure promotional effectiveness.
When It Triggers
Customer applies a coupon to their purchase
Purchase is completed with the coupon discount
Parameters
data.source
number
Server ID of customer
data.shopId
string
Unique shop identifier
data.shopName
string
Display name of the shop
data.customerIdentifier
string
Customer's identifier
data.customerName
string
Customer's name
data.couponCode
string
The coupon code used (uppercased)
data.couponType
string
'owner_created' or 'loyalty_reward'
data.discount
number
Discount percentage
data.discountAmount
number
Actual dollar amount saved
data.purchaseAmount
number
Purchase amount
data.currentUses
number
Total times this coupon has been used (owner_created only)
data.maxUses
number
Maximum uses allowed (owner_created only)
data.rewardName
string
Name of the loyalty reward (loyalty_reward only)
data.timestamp
number
Server timestamp
Example
Last updated