#wiiim
1 messages ยท Page 1 of 1 (latest)
I just want the receipt in the mail, I disabled the "Email finalized invoices to customers" option in "Manage invoices sent to customers" already
Hello, how are you taking payment here? And are you using this kind of Invoice: https://stripe.com/docs/invoicing
Or is this possibly just a receipt after you create a PaymentIntent and confirm that
Do you have the ID of a payment that still had that email sent out after you set that setting?
Unfortunately I am not finding a setting for this. We have a setting to turn off success emails for non-invoice payments but for invoices we don't seem to have a comparable setting https://dashboard.stripe.com/settings/emails
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
To clarify, "Email finalized invoices to customers" is about when an invoice goes out of its draft status so that email is before the payment
So if I create the payment intent without an invoice, there will be no email sent at all or will the invoice just be not in the attachments, only the receipt?
The first one, all >$0 invoices have a payment intent but not all payment intents have an invoice. If the payment intent is created directly, the email receipt for it follows the behavior of the setting that I linked to
I am trying to look in to if there is a way to enable your account to disable those invoice emails. Will get back to you if I can find something
Alright thank you very much. I have another small question which would help me a lot, but maybe not related to coding. My team and I tested some payments in live mode and noticed that the phone number of the business owner is displayed in the description of the chosen bank/credit card institute. Is there a way to remove that? I've already removed in from the invoices but can't seem to find another setting.
Good question, I think we send whatever phone number is set on your business profile but unfortunately I am not immediately sure if that can be turned off or if that is a regulatory requirement or something. I will look in to that for a bit but may have to direct you to our support as I think they would know more here
Sounds good, thanks ๐
Also good news, it turns out that I was wrong, if you turn off the setting for email receipts on this page it will turn off invoice emails as well https://dashboard.stripe.com/settings/emails
Unfortunately I am not finding info on the phone number question. I would recommend reaching out to our support for more information there https://support.stripe.com/?contact=true
Got it
But this would disable any emails about a successful payment then right? I only want the Receipt in the mail as an attachment
No invoice as an attachment nor a link to download it
But I guess this would only work if I just create the payment intent directly, if I understood you correctly
Apologies I misunderstood your question. Unfortunately we don't support customizing the email like that. To achieve that you would have to turn the emails off and then send your own version of the email on successful payments
That setting affects both emails from payment intents created directly and for invoice payments. I was mistaken in thinking it only applied to payment intents
Alright, that would solve my question. So would assume that I should listen on a webhook (invoice.paid) and send an email myself?
Hi ๐
There are a couple things to consider about invoice.paid vs invoice.payment_succeeded but it might not matter for your integration
invoice.paid will fire any time an invoice is marked as paid
invoice.payment_succeeded will only fire when the payment goes through Stripe
Alright, I think I'll use payment_succeeded then. How would I pull the receipt of the payment so I can attach it with code to my thrid party email api?
The Payment Succeeded event will return the Invoice object. You can link to the invoice_pdf if you want to share that with your customer. https://stripe.com/docs/api/invoices/object#invoice_object-invoice_pdf
You can also extract all the information to build your own receipt for your custom email, including the receipt_number: https://stripe.com/docs/api/invoices/object#invoice_object-receipt_number
Is there also a receipt_pdf ? I want to clarify: I'm not interested in the invoice & i don't want to send it to the customer, just the receipt.
I might remember a "Download receipt" button when paying a payment in test mode, is something like that exposed to the api aswell?
Unfortunately that is Dashboard functionality that isn't in the API . You can extract the receipt_url from the related Charge object. invoice.payment_intent.latest_charge
Alright, but isn't that exactly what I was searching for? When webhook triggered -> gather payment intent -> get latest charge and return the receipt url
Right, I'm saying we don't have exactly what you are looking for so I'm trying to get as close as we can. The receipts are Stripe hosted because we keep them up-to-date with any changes that occur on the latest charge. For that reason we don't provide them as PDFs.
In this case you can reduce your API calls using the Expand parameter: https://stripe.com/docs/expand
You would retrieve the Payment Intent and include the latest_charge in the expand parameter: < https://stripe.com/docs/api/payment_intents/object#payment_intent_object-latest_charge>
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, the url just links to a actual website hosted? So it's not really downloadable?
Correct. For any Payment you see on the Dashboard you can View Receipt but I don't think we allow download for just that reason
Hmm I see. So I have to collect the relevant data (ids, amount, items) and so on and build the receipt myself.
This will clarify some internal issues in my team a bit. Thank you ๐