#thekents_checkout-invoice
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/1226937795554181232
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
this is what i mean by invoice number
The request you shared is a Checkout Session creation request. The invoice is only generated after the Customer completes the payment.
The invoice property on the Checkout Session should include the Invoice ID. https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-invoice
Do you have an example Checkout Session ID I could review?
cs_test_b1gw0uKh9lrSeIBIpBx8cnZttfpp9cosl68OrwOSs4v3mG0D0dwLsjUeAw
Yeah i get the invoice ID, but is it possible to get the invoice number
this is the invoice ID in_1P31HiC8VwQdnO07ZIrlKVhI
When you get the Checkout Session, in the code you shared, you can pass expand: ["line_items", "invoice"] and that will return the full Invoice object and you can get the value you are looking for in the number property https://docs.stripe.com/api/invoices/object#invoice_object-number
No problem, it's why we're here ๐
thekents_checkout-invoice