Siren

CouponApplied

Fires when a customer uses a coupon code during checkout. Powers coupon-based affiliate attribution.

Last updated: April 8, 2026

CouponApplied

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 two things: the coupon code as a string (always uppercased for consistent matching against Siren’s alias table) and the Opportunity model for the customer session.

use Siren\Commerce\Events\CouponApplied;

$event = new CouponApplied(strtoupper($couponCode), $opportunity);

How does the pipeline react?

The BoundCouponUsed engagement trigger strategy handles this event. It looks up which collaborator owns the coupon code (via the alias system) 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.