#altairsama2_api

1 messages ยท Page 1 of 1 (latest)

dry bayBOT
#

๐Ÿ‘‹ 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/1311977117461778464

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

oak vale
#

hello! Do you just want to see how the receipts look like?

jade kraken
#

our usecase is sending payment success/error (payment receipts) emails for checkout sessions /invoices where we can use receipt_email parameter of payment intents

oak vale
#

if so, you can manually send the receipts via the Dashboard

jade kraken
oak vale
#

E2E testing isn't going to be possible cause the email won't be sent automatically in test mode

#

what's your actual test criteria here?

jade kraken
#

let's say client goes through the checkout session, will they get the emails for payment receipt and invoice (we explicitly enable invoice creation when we create the checkout) on success? and what emails on error?

and we a have secondary invoicing flow, where we auto bill customers by creating ad-hoc invoices and stripe auto-deducts them with the payment method attached

#

and lastly, if there's a way we can modify payment intent's recipient_email parameter for both checkout/invoicing because afaik, stripe creates it for us

jade kraken
oak vale
#

let's say client goes through the checkout session, will they get the emails for payment receipt and invoice (we explicitly enable invoice creation when we create the checkout) on success? and what emails on error?

yes, they will get the email for payment receipt if you enabled Successful payments in your Dashboard settings on https://dashboard.stripe.com/settings/emails. Yes, the invoice will also be generated upon successful payment.

There are no emails for payment failure

#

and we a have secondary invoicing flow, where we auto bill customers by creating ad-hoc invoices and stripe auto-deducts them with the payment method attached

I'm getting you're asking the same questions i.e. will they get the emails for payment receipt and invoice on success? and what emails on error?

jade kraken
#

yeah

#

so for failures, we need to send our own emails?

oak vale
#

For Checkout, I would say, only for asynchronous payment methods. For synchronous payment methods, the customer is already on the Checkout page and they know immediately if payment failed

jade kraken
#

and I am assumign it would be the same for invoicing too?

dry bayBOT
unreal vigil
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

jade kraken
#

appreciate it!

unreal vigil
jade kraken
unreal vigil
jade kraken
#

and do you think its a good idea to modify PI when we get the PI.created event?

unreal vigil
#

and to test it it out in test mode you need to use the same email as the owner of the account

jade kraken
jade kraken
jade kraken
unreal vigil
jade kraken
unreal vigil
#

are you using charge_automatically or send_invoice for the payment_behavior ?

unreal vigil
#

in that case, you need to listen to invoice.payment_failed to send them an email yourself

jade kraken
unreal vigil
#

yes only the receipt

jade kraken
unreal vigil
#

and not the invoice PDF

unreal vigil
jade kraken
jade kraken
#

and there's a payment_intent.receipt_email parameter which does this

#

I just wanted to ask, for this customization, should I just listen for the payment_intent.created webhook event and modify it there?

#

since afaik, stripe creates PI objects for us in both of our flows

unreal vigil
#

for invoices the customer email would be used

jade kraken
#

oh damn, I missed that one my bad

jade kraken
unreal vigil
#

you can update the customer's email ahead of the creation of the invoice

jade kraken
unreal vigil
#

sure let me know if you need any more help

jade kraken
unreal vigil
#

is this for Checkout Sessions or Invoices?

jade kraken
unreal vigil
#

would you mind sharing some IDs I could look at?

jade kraken
#

and should I DM you?

unreal vigil
#

you can send them here, a Checkout Session ID and an Invoice ID

jade kraken
#

yeah sure

jade kraken
unreal vigil
jade kraken
#

yeah but it should still work right?

#

since customer in this case is account owner ?

unreal vigil
#

actually you're right, the receipt email is updated

#

I'm checking if the email was sent or not and why

#

I can see that the email was sent successfully

#

oh sorry I'm wrong

#

I'm looking at an old email

jade kraken
dry bayBOT
feral sinew
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

jade kraken
feral sinew
#

Just to clarify, you want to receive a receipt email in Test mode?

#

If so, I checked with the team and you won't be able to do this, unfortunately.

jade kraken
#

tarzan said something about owner account emails

#

just wanted to confirm that

feral sinew
jade kraken
#

ah, none of them match our usecase

#

but this email log is really helpful

#

thanks!

feral sinew
#

Happy to help.

jade kraken
feral sinew
#

What do you mean by "customer log"?

jade kraken
#

emails sent are also logged right?

#

that log is empty in test mode

feral sinew
jade kraken
#

this is the customer id in test mode cus_RGRWC91ncSVP08

feral sinew
#

The Logs section of Customer page only lists API requests made by your app. Sent emails won't go there, but to Sent emails section. But since no emails were sent in Test mode, you won't see anything there.