#wiiim

1 messages ยท Page 1 of 1 (latest)

rancid lintelBOT
forest oar
#

I just want the receipt in the mail, I disabled the "Email finalized invoices to customers" option in "Manage invoices sent to customers" already

dusty rose
#

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?

forest oar
#

Sure, one second

#

pi_3MpC3IBedPgr0Zv21tIBSDi4

rancid lintelBOT
dusty rose
#

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

forest oar
#

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?

dusty rose
#

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

forest oar
#

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.

dusty rose
#

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

forest oar
#

Sounds good, thanks ๐Ÿ™‚

dusty rose
forest oar
dusty rose
#

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

forest oar
#

Alright, that would solve my question. So would assume that I should listen on a webhook (invoice.paid) and send an email myself?

vale hemlock
#

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

forest oar
#

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?

vale hemlock
forest oar
#

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?

vale hemlock
#

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

forest oar
#

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

vale hemlock
#

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>

forest oar
#

Oh, the url just links to a actual website hosted? So it's not really downloadable?

vale hemlock
#

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

forest oar
#

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 ๐Ÿ™‚