#vienklett
1 messages · Page 1 of 1 (latest)
Hello! Give me a few minutes and I'll be able to help
thanks
When you're attempting to give the discount, has the invoice already been finalized at that point?
You're options are a bit more limited if it's already been finalized, but I think you should still be able to get around it by creating a credit note
yeah, the invoice already finalized since user paid subscription upfront for us.
how to create credit note?
will credit note auto refund for user? or i need to handle it as extra step
one more question, how can we check if the invoice is finalized?
And yes, a credit note will automatically generate a refund if you use it correctly
You can check that the invoice is finalized by checking it's status. If it's not a draft then it's been finalized (https://stripe.com/docs/api/invoices/object#invoice_object-status)
thanks
will work on this direction
and do you know how to add coupon for the next billing cycle - when user renews the subcription through API
You can just update the Subscription and provide the coupon (https://stripe.com/docs/api/subscriptions/update#update_subscription-coupon) - that should automatically apply it to the next billing cycle