#wangkele26gmailcom_api
1 messages · Page 1 of 1 (latest)
👋 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/1305854256003289153
📝 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.
- wangkele26gmailcom_api, 6 hours ago, 16 messages
- wangkele26gmailcom_api, 19 hours ago, 3 messages
hi! one way that would work would be to create a Customer with those default fields and then pass that Customer to customer on the CheckoutSession when creating it.
https://docs.stripe.com/api/customers/create#create_customer-invoice_settings
I’ve tried all the solutions provided by your colleague, but none of them seem to be quite suitable.
I have tried this solution, but there are two issues:
1.This solution only adds a footer but no description.
2.If a user creates two subscriptions simultaneously, the latter overrides the information added by the former (each subscription has different footer information).
yeah there is no perfect solution sorry
For point 1 you can probably call Invoice.update(description=foo) when handling the checkout.session.completed event
I don't really understand your point 2 without an example.
Will the first point actually work? Based on my testing, when the invoice.created callback event is received, the invoice status is already set to paid.
it is yes
For the second point:
If a user creates two subscriptions at the same time, the footer information set for the later subscription will overwrite the one set for the earlier subscription (each subscription has different footer information).
you can set description still I think. Description is not shown to the Customer AFAIK so it doesn't really matter if the Invoice is paid, it's just something for your records.
hmm that's just repeating what you said, it's not any clearer
why would a user create two subscriptions at a time?
if it's a problem, don't let them do that. But yes ultimately since it relies on a Customer-level default it can break.
You can also, after the CheckoutSession completes, update the resulting Subscription to set the invoice_settings.footer there , so that any future changes to the Customer don't impact it(i.e. copying the settings 'into' the sub)
Alright, I’ll give the first approach you mentioned a try.
You might have misunderstood me. I was referring to the description on the invoice, not the description shown to the customer.
what field is that in the API?
If I'm not mistaken, the description you're talking about is the customer's description
What I’m referring to is the description on the invoice.
👋 taking over for my colleague. Let me catch up.
my colleague was referring to the invoice's description
not the customer's subscription
yeah I'm talking about https://docs.stripe.com/api/invoices/update#update_invoice-description . If there's something different you meant by description when you said "This solution only adds a footer but no description." then please clarify.
So, is there currently a way to add a footer and description to the invoice when a subscription is created for the first time?
Neither the subscription trial nor modifying the customer's default invoice settings solutions are perfect.
I would say no, and we've suggested some various workarounds
and yes, I said earlier there is no pefect solution
Are there any other ways to achieve this?
I would say no. There are just known pain points with the way we immediately finalize the first invoice of a subscription, these are those pain points; there are workarounds that we can and have suggested