The Stripe library accepts a coupon at subscription creation
When creating a subscription, the code using the library can pass a discount coupon. With no coupon, nothing changes.
The function that creates a subscription in Stripe now accepts a coupon. The library forwards the discount to Stripe, which applies it to the charge.
The core does not decide campaigns or pick a discount: the code using the library passes the coupon. The rule for who is entitled to which coupon stays with the project.
The delivery has tests for both cases, with and without a coupon, and was validated in a test environment with a plan paid by test card and a 10% coupon.
In short
- Coupon passed when creating the subscription
- No coupon, previous behaviour
- Validated with a test payment
Source: Core · req-192 · BATCH-196