#๐ (Luca)
1 messages ยท Page 1 of 1 (latest)
Is there a particular limitation that is preventing you from using the Stripe coupons?
Alternatively you could apply a trial to existing subscriptions, too: https://stripe.com/docs/billing/subscriptions/billing-cycle#using-a-trial-to-change-the-billing-cycle
thank you for the help.
I'm checking coupons.
So, you are saying that I can apply trial to a subscription that had a trial before?
What happens if the user tries to redeem a code and the subscription is in incomplete status? Is the status changed to trialing again?
Regarding coupons, we don't want the user to input the coupon during checkout
We want the user to redeem free months for the subscription before the end of the subscription
So, you are saying that I can apply trial to a subscription that had a trial before?
Correct, yep. You can apply trial to an active subscription at any point
What happens if the user tries to redeem a code and the subscription is in incomplete status? Is the status changed to trialing again?
No, it'll error:
{
"error": {
"message": "You cannot update a subscription in `incomplete` status in a way that results in a new invoice or invoice items. Only minor attributes, like `metadata` or `default_payment_method`, can be updated on such subscriptions.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_cE3L1vO3xeiAkD?t=1668159201",
"type": "invalid_request_error"
}
}
We want the user to redeem free months for the subscription before the end of the subscription
You can apply a Stripe coupon/promotion code at any point โ it doesn't need to be during creation/checkout
ok so I will need to update a subscription attaching a coupon to it, correct?
How can I define a coupon that will give the user X months for free?
oh perfect! this is so helpful thank you!
So while editing a subscription, adding a coupon, it is possible the subscription has a status that is not active or trialing.
Can you please list the subscription statuses that won't create an exception/error?
Because at this point, I need to understand when to create a new subscription (with a coupon) or when to update an existing one
AFAIK you can apply a coupon/discount to a subscription with any status (except cancelled I guess)
This should be easy enough for you to confirm via some testing. I just tried incomplete and it worked but the new discount didn't apply to the already created initial invoice โ it'll be applied to subsequent billing periods
Oh I see, this will be a problem actually.
We want the discount to be applied immediately
Then you'd just pass it on your creation API call
And the initial invoice will include the discount
So in this case, I see 2 options:
- Cancel that subscription and create a new one with the discount
- Adding a trial period period to the existing subscription -> Just wanna make sure the subscription will be moved from status
incompletetotrialingagain. Can you confirm that?
To clarify you mean you want an immediate discount applied to all subscriptions regardless of status when updating with a coupon?
Adding a trial period period to the existing subscription -> Just wanna make sure the subscription will be moved from status incomplete to trialing again. Can you confirm that?
It won't work, it'll error (as I shared above):
{
"error": {
"message": "You cannot update a subscription in `incomplete` status in a way that results in a new invoice or invoice items. Only minor attributes, like `metadata` or `default_payment_method`, can be updated on such subscriptions.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_cE3L1vO3xeiAkD?t=1668159201",
"type": "invalid_request_error"
}
}
The user can only have 1 subscription in our case. I would like that the user, while redeeming the code, will have X months for free on that subscription.
ok I see, so I need to cancel that subscription and create a new one I guess
Then I guess you'd need to some logic to determine subscription status and act accordingly:
- If
active/trialingupdate and apply coupon for X free months. - If
incomplete/past_duecancel and create a new subscription with the same coupon.