#skoshkarli-dicount
1 messages · Page 1 of 1 (latest)
Hi there, no the discount will be separate from the price. So the amount of the Invoice/PaymentIntent will be lower but the Price itself will stay the same.
So in order to display to the customer the amount that is being discounted for the subscription, i'd have to get the coupon info and apply it manually to the price?
Do you just want to show them the actual charged amount of the invoice?
we have a page where it shows them how much they are getting charged, so thats what i want to show them (including any discounts)
Gotcha so in this case you want to retrieve the invoice (you can also get there from expanding the subscription.latest_invoice if you retrieve the subscription) and then you would expand the payment_intent for the actual charged amount and you can look at the discounts as well if you want to show the discounted amount.
https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent is the paymentintent
Basically you want to retrieve the invoice and expand any attributes that you want more details on (and are expandable) and the invoice will have a variety of data that you can display
got it, thats perfect. Thank you!
Sure!
sorry, got another follow up on that. If lets say we have a cusotmer who has a 90 day trial and has a coupon code applied, to a monthly subscription. His first three invoices would be 0 i take it.
how do i handle that kind of a case?
You want the coupon to start after the trial I assume?
Then I think you would want to use a Sub Schedule here where you applied the coupon after the trial ends or you would need the coupon to account for the trial and be long enough for afterward
how would i display to the user the amount that they will be charged after their trial ends?
You can use our upcoming invoice endpoint: https://stripe.com/docs/api/invoices/upcoming
ok let me take a look at that