#mehdi-invoice
1 messages ยท Page 1 of 1 (latest)
Hello! There isn't a way to update the Invoice description once the Invoice has been finalized, which can be difficult with Subscriptions because in a lot of cases they automatically finalize the first Invoice when the Subscription is created
There's a couple of ways around this
You could create the Subscription with a really short trial (like a couple of seconds), so that the first Invoice is the $0 trial one, and the second Invoice (that you care about) can still be updated
You could also use Subscription Schedules instead
it created the first invoice for a subscription, with a description
Ahhh, I see how the dashboard does it - they're using a dashboard-only parameter (invoice_settings.description) when they create a Subscription. But you can only set this through the dashboard, so it won't work for you
oh hmmm
why can't I pass that as a parameter?
is it blocked on the backend? or can I just manually pass it
If you pass it in the request will fail, because we only allow it to be set from requests made through the dashboard
hmmm
if I use a subscription schedule, can I set it as part of default_settings.invoice_settings ?
No, if you use Subscription Schedules you'd make a separate API request to update the Invoice description (which you would be able to do because the Invoice wasn't finalized yet)
ahhh I prefer not having to finalized the invoice manually
or have weird states for the subscription
is there any plan to let the API set invoice_settings.description?
The Invoice will still finalize automatically, but it'll start off as a draft and then automatically finalize in an hour
I don't believe there's any plan to allow general usage of invoice_settings.description (but I'm definitely flagging it as feedback)
oh with subscription schedules though, we would send an invoice to the user, right?
No, you could still use charge_automatically with Subscription Schedules - Schedules are just a different way of creating and making updates to a Subscription
hmmm so would the right way to do this, make a schedule, create a subscription from it and then release the subscription from the schedule?
Yeah, that's one way to do it ๐
the other way around this is the short trial thing I mentioned earlier
what would be the right end date for the phase in a schedule?
Hi ๐ @sullen atlas had to step away so I'm jumping in here. Can you describe which phase in a schedule you are talking about?
hey, we were talking about using subscription schedule phases so that we could set description on the first invoice in a subscription
If I understand correctly the point of using a Subscription schedule is to use charge_automatically but still have the 1 hour draft period to edit the first invoice. Is that correct?
ahh yeah
Okay so you can set either the end_date or the iterations of the phase to whichever you want and by default, the subscription schedule will transition to a plain Subscription once the phase is over.
We point that out here: https://stripe.com/docs/billing/subscriptions/subscription-schedules#completing-schedule
I just tested this out creating a Subscription Schedule and the first invoice was created in Draft mode.
if I want it to immediately turn into a plain subscription, can I put end_date 'now' ?
I wouldn't do that just in case it alters the behavior of that initial invoice. Instead I would add an iteration of 1
The behavior (except for the initial invoice) will be identical to a plain subscription.
is there some reason why the default payment method from the customer is not applying to the subscription schedule?
for example, I tried to finalize this invoice: in_1Lq0XWGMqtYOJnNwC1j3vzDY
the customer has a default payment method
or do I need to set default_settings.collection_method to charge_automatically?
Okay looking at the Customer I see the default_payment_method is pm_1LlGQkGMqtYOJnNwXO27jebF. When I look at the Invoice and I check the related Payment Intent (where we actually collect payment) I see the Payment Method used is pm_1LlGQkGMqtYOJnNwXO27jebF. The current stat of that payment intent is requires_confirmation.
More like stripe.invoices.confirm: https://stripe.com/docs/api/payment_intents/confirm
uhhh, why do I need to confirm the payment intent? when I create a subscription normally with this payment intent, it works
hmm okay, I think I worked around by it paying the invoice instead of finalizing it
Well the invoice was already finalized
But yeah I guess that step also confirms the Payment Intent.
ahhhh okay
thanks for all your help! this was a round-about way to set description on the invoice but it worked
I'm glad we got it working for you!