#Julio-preview-invoice-discount
1 messages · Page 1 of 1 (latest)
ok i'll explain better
This customer has already a subscription in which he has used a Coupon.
id = cus_Mba5UgIzPyRvCS
But i only want to get the upcoming invoice of a oneshot invoice .
Meaning i have a price and a quantity and i want to check how much he will pay for this particular price and quantity.
But for this upcoming call, i don't want to get the upcoming invoice of the subscription
The request to retrieve an upcoming invoice will include Subscription information, the exact behavior that the system uses is described here:
https://stripe.com/docs/api/invoices/upcoming#upcoming_invoice-subscription
If you want to avoid including any existing details from a Customer when previewing an Invoice, then it is likely easiest to create a new Customer object that is purely used for previewing invoices (never has a Subscription created for it or Invoice Items left on it).
ohhh
i can't see the sentences you've copied in here on the doc
about the "new Customer"
That's not in the documentation, it's my recommendation.
No, I would avoid putting any Subscriptions or Invoice Items on that Customer, and repeatedly use it for previewing one-off Invoices.
ok a dummy customer just for these previews , got it
Yup, exactly.