#blackarcanis_email-receipt-options
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1252598264323112962
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
hi there!
there's no setting at the customer level. it's either the dashboard setting you mentionned, or setting receipt_email in the API
OK; so with the API; when do I have to set this "receipt_email" setting? Because I will receive the webhook tha the payment intent succeed, but if I try to update the payment intent at this moment to set this setting, that probably be too late or failed as the object is currently being processed ?
how are you making the payments? With Checkout Session, PaymentIntent, Invoice, something else?
It will be for recurring charges on subscription
So, we are not creating the payment intent ourselves; it's automatically done by Stripe
hum... let me think about this.
usually the trick is to set receipt_email when creating the PaymentIntent. but like you said in your case you don't directly create the PaymentIntent, and I don't see a way to set this property from the Subscription or Invoice.
maybe one option would be to just uset the email property on the customer object, this way to receipt would be sent?
Yes but the idea was to use the email feature of Stripe to send the receipt directly. Of course, we can do it on our side, using our own mail provider, but my point was to avoid that; if possible :/
yes exactly:
- set the dashboard feature to true
- for customers who want to receive the receipt, make sure the
emailis set on the customer object - for customers who don't wnat to receive the receipt, make sure the
emailis NOT set on the customer object
We have already set this email value for all our customers Stripe and need to continue to do so for other requirements on our side; not an option unfortunately.
Yea in that case there really is no other option beyond reactively setting the receipt_email per payment, but I can share feedback about this that you'd like to have more options to control how this works ๐
I understand, what timing is about "reactively setting the receipt_email per payment" when it's about recurring charges like that? I'm curious; even if I think we will fallback to our own email process.
If you want to share your account ID or any object in your account i can get that from, I can attach your account to this feedback to be contact in future.
The timing would be you setting the receipt email on the payment intent following each successful invoice payment by listening to the webhook events like you initially described. It sounds like you're already doing this.
Our account ID is: acct_197n1pEAXIGNKSo5
So "following each successful invoice payment"; when receiving "payment_intent.succeeded", update the associated invoice will be good? That will not be too late ?
update the associated payment intent I mean; it's where the receipt_email is if I'm right
It's not too late, you can set the receipt email after the payment is completed to trigger an emailed invoice.
https://docs.stripe.com/api/payment_intents/update#update_payment_intent-receipt_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.
Oh, it's the update of this field that is doing the trigger? It will only be send once? What about changing the value of this field, sending another email or not?
If I recall, I think emails only trigger when going from unset to set, but I could be mistaken. This is a bit of a workaround from setting it on creation.
But my memory suggests this will send again if unset then set to a new value
(This is difficult/impossible for me to test since test mode doesn't send emails generally, and where it does then only to your own account email)
Hum I see; and yes, the test env is not sending the email unfortunately... I'm taking note of this, I appreciate your help! You can close this ticket; but still share this feedback about having a better control over this receipt setting; on customer/subscription level will be great!
Yep, already shared exactly that, a request to be able to set this on customer and/or subscription objects. I agree this would be useful! I can't promise if/when we'd offer this, but I hope that we do!
Great, thank you for your help!
NP!