CouponApplied
Fires when a customer uses a coupon code during checkout. Powers coupon-based affiliate attribution.
WordPress plugin
Last updated: October 26, 2026
CouponApplied fires when a customer uses a coupon code during checkout. This is how Siren powers coupon-based affiliate attribution: the coupon event creates the engagement that links the customer to a collaborator, and a subsequent SaleTriggered event creates the conversion that credits them.
The event ID is coupon_used, and its fully qualified class is Siren\Commerce\Events\CouponApplied.
What does this event carry?
Unlike the sale events, CouponApplied does not carry transaction details. It carries the coupon code as a string (Siren matches it against its coupon records without regard to case), the Opportunity model for the customer session, and an optional source naming the integration the code came from, such as wc, edd, llms, or nc. With a source, Siren looks for that integration’s coupon first. Without one, it matches the code in any store.
use Siren\Commerce\Events\CouponApplied;
$event = new CouponApplied($couponCode, $opportunity, 'wc');
How does the pipeline react?
The BoundCouponUsed engagement trigger strategy handles this event. It looks up which collaborator the coupon code credits in Siren’s coupon records, preferring the coupon from the same store and integration as the order (on Siren Cloud, a use that names no integration matches only the site’s own codes on its Property), and creates engagements for every active program where that collaborator has the coupon trigger enabled. See Coupon Code Tracking for a user-level overview of how coupon attribution works across integrations.
The coupon event and the sale event work in sequence. The coupon event establishes attribution by creating the engagement. A subsequent SaleTriggered event, which fires when the checkout completes, creates the conversion that actually credits the collaborator with the sale.
For the full lifecycle of commerce events and how they connect to the rest of the attribution pipeline, see the Commerce Events overview.