#thekents_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/1227155475372572702
๐ 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.
- thekents_checkout-invoice, 14 hours ago, 13 messages
https://docs.stripe.com/api/charges/object#charge_object-receipt_number are you talking about the receipt_number from the charge object?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I dont think so.. I am coding a confirmation screen for a ecom store, I am already fetching a checkoutsession using session_id
I dont see a way to get a charge aswell, atleast without expanding anything
Then what kind of receipt number do you refer to?
The second one found in Receipt PDF
First one is invoice number, second is receipt number
Invoice number i can get by expanding invoice
What's the invoice ID?
in_1P31HiC8VwQdnO07ZIrlKVhI
That is an invoice ID for one of the test checkouts
Okay it seems that for test checkoutsessions with paid invoice enabled, it doesn't create receipt
so the receipt number would be null
But for live checkoutsessions, there is an receipt_number field under invoice object
I expect that to be populated then?
How come receipts arent created in test mode?
Is it the same invoice ID?
No, it is the test one
But shouldnt it work the same?
in_1P3P2eC8VwQdnO07sjnLH7mR
This is the one is live invoice
The one i showed you a ss from
https://dashboard.stripe.com/events/evt_1P3P2jC8VwQdnO07zVf7oSY4 I do see a receipt_number in the invoice.paid event
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Is this what you are trying to get?
Yes, and i can get that by retrieving session and expanding invoice, but if i try the same in test mode, (in_1P31HiC8VwQdnO07ZIrlKVhI) the receipt number is null
Is it by design that test mode doesn't generate receipts or?
OK, https://docs.stripe.com/api/charges/object#charge_object-receipt_number so the receipt_number is only set when the receipt email is sent, and we don't send emails in test mode.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Oh okay, so by sending the receipt it should also generate a receipt_number
Yes you are right
Yeah okay, thank you.. Hope you have a nice day ๐
Happy to help!
Also, is it possible for user to edit their email address after ordering?
Like something like this?
You mean the customer_email https://docs.stripe.com/api/invoices/object#invoice_object-customer_email ?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yeah or sessions customer_details.email
As explained in the API ref doc, once the invoice is finalized, this field can't be changed anymore.