#windlepoons-subscription-coupon-preview
1 messages · Page 1 of 1 (latest)
https://stripe.com/docs/api/invoices/upcoming works without a subscription id, so that's what you'd use
There's no customer yet either.
you do have to create a customer in that case upfront
The docs are a bit confusing, it appears that maybe I can just supply customer_details and not have a customer or subscription?
or you can use a "fake one" just for simulating calculations (but it won't work for tax calculations where you'd use customer_details instead: https://stripe.com/docs/api/invoices/upcoming#upcoming_invoice-customer_details
I don't think just customer details works unless you do automatic tax, but easy enough to try to confirm quickly on your end!
Ah, ok, I'll poke around and try and see what works.... don't most websites show you what your subscription price looks like after applying a coupon before you pay? Isn't this common enough that there should be some docs on doing it?
Also, if I include customer_details, which parts of the structure are needed? The API docs say its all optional.
Am I supposed to fuzz the API till I find a working combo? That seems..... weird.
I don't disagree with that statement, but it's not clearly documented today at least
So I tried that API, using the price as an invoice item, and I get this error:
| "message": "The price specified is set to type=recurring but this field only accepts prices with type=one_time.",
So I can't specify an invoice item with a price that is a recurring subscription?
Ah, I need to use subscription_items.