#felix_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/1333916793256808538
๐ 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.
Hi there
Hey, nice to see you again ๐
Price details will be included in the Session's line_items but line_items are not included in the checkout.session.completed event; you'll need to make a separate call to retrieve the Session and expand line_items: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-line_items
Ahhh, I see it now
Expanding line_items will include the Product ID for each of the items. If you need more details about the Product, you'll need to expand the Product as well
Alternatively, you can keep some mapping between Products, Prices, and PaymentLinks on your end. Then, when you receive a checkout.session.completed event, look at the payment_link value
How to get the invoice, is invoice is null?
Why ist it null at this cehckout session?
This PaymentLink will not create an Invoice
If you want payments completed via this PaymentLink to create Invoices, you'll need to edit your PaymentLink in the Dashboard (or via the API) to do this.
If it is a subscription it does, but why not at normal products?
Right, so Billing payments will automatically create Invoices, but one-off payments will not
This is the setting you're looking for when editing the PaymentLink
So I need to acticate "create an invoice"?
Correct
One-off payments will also not create a customer automatically right?
Is there an option to do so?
Ahhh, it will, okay...
So the invoice.paid event is also fired if i enable the "create an invoice" event
Right, since an Invoice is created and paid with that setting enabled