#nstripe0_api

1 messages ¡ Page 1 of 1 (latest)

sturdy lindenBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1278135137267224671

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

gray plinth
#

Hi there

#

When you create a Subscription, that first Invoice is immediately finalized, which means the description can't be edited. There are a couple of workarounds:

  • You can use collection_method: 'send_invoice', which will keep the Invoice in draft state for ~1 hour
  • You can use collection_method: 'charge_automatically' but introduce a trial period of a few seconds into the future so the first Invoice is in draft and you have some time to add the description
soft lake
#

Hi roadrunner

Does send_invoice really send an invoice to the customer via email? If so, we probably don't want that.

gray plinth
sturdy lindenBOT
soft lake
#

With the trial period workaround, will there be an invoice available already that I would be able to update the description on?

boreal bison
#

yes, you can test things out to see if it works for you

soft lake
#

It doesn't seem to work.

req_59IySNxb3bcna0
Here is the request of my new subscription with a trial_end a few seconds into the future 5:07:15 PM PDT

However, the latest invoice for the subscription was created and finalized at 5:07:11 PM PDT
in_1PsZPmFOrEmR4dyh6SjeHnmK

boreal bison
#

i think we're referring to the second invoice specifically in the case of the trial. The first invoice for a trial is always $0

soft lake
#

Oh, I see. Would I need to look up invoices for the subscription to find the upcoming one?

#

I was grabbing the latest_invoice

boreal bison
#

this is the invoice that you want in_1PsZTeFOrEmR4dyh0tR2cJot

#

you can listen for the invoice.created webhook if you prefer

soft lake
#

Hmm, I'm trying to do all this as part of an online transaction with the customer initiating the creation of the subscription, so the more I can expedite the processing on a single thread with the simpler and faster I think.

#

Didn't realize doing this would be more cumbersome, unfortunately.

#

Thanks for your advice though

#

#1278135137267224671 message

The invoice that has the amount (in_1PsZTeFOrEmR4dyh0tR2cJot) is actually not created yet until 5:11:10 PM PDT... a few minutes afterwards... rather than when the trial ends apparently.