#altairsama2_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/1311977117461778464
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! Do you just want to see how the receipts look like?
our usecase is sending payment success/error (payment receipts) emails for checkout sessions /invoices where we can use receipt_email parameter of payment intents
if so, you can manually send the receipts via the Dashboard
hey, we just need to test it for E2E testing
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?
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
this I am figuring might be possible if we modify the PI when the webhook hits us
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
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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?
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
ah, but no emails right? just wanted to confirm that, since requirement is explicit there
and I am assumign it would be the same for invoicing too?
๐ taking over for my colleague. Let me catch up.
appreciate it!
that's correct if you're using Checkout
and invoicing too?
the invoice won't be generated unless there was a successful payment
and do you think its a good idea to modify PI when we get the PI.created event?
and to test it it out in test mode you need to use the same email as the owner of the account
no, for our secondary invoicing flow, where we create adhoc invoices
ah, owner as in who registered on stripe right?
usecase for this is to customize the recipient_email parameter for both checkout and invoicing flows
Invoices are different
gotcha, just to confirm, will they get payment receipts for success? and nothing on error?
are you using charge_automatically or send_invoice for the payment_behavior ?
yes
charge_automatically
in that case, you need to listen to invoice.payment_failed to send them an email yourself
ah thanks, so same as in the checkout session case where we listen for it and send email accordingly, but for success payment receipt will be sent, just to confirm
yes only the receipt
and what do you think of this?
and not the invoice PDF
I'm not sure what you mean by that
we need to explicitly enable this on the dash right? and then it'll work
we want to customize the email recipients for payment intents
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
why not just pass the email when you create the checkout session https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-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.
for invoices the customer email would be used
oh damn, I missed that one my bad
so no customization on the invoices front?
you can update the customer's email ahead of the creation of the invoice
ah, gotcha thanks, really appreciate the help!
sure let me know if you need any more help
hey, in our case, even the account owner is not recieving any emails when testing our integration, just double checked now, are there any logs or anything I can look into to debug this?\
is this for Checkout Sessions or Invoices?
both
would you mind sharing some IDs I could look at?
yeah sure, which ones do you need?
and should I DM you?
you can send them here, a Checkout Session ID and an Invoice ID
yeah sure
this is for the adhoc invoicing: pi_3QQR21RZWtp6H1GV1CrnsT6d and this for checkout pi_3QQR1XRZWtp6H1GV1bqsbYad
you didn't pass the reciept_email for the checkout session as I mentioned earlier https://dashboard.stripe.com/test/logs/req_wsRu4CZ8fYmL1k
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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
thanks, really appreciate it
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
thanks. appreciate the help
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.
ah thanks, so no emails are available on test mode just to confirm right?
tarzan said something about owner account emails
just wanted to confirm that
No, that's just for specific Stripe Billing scenarios: https://docs.stripe.com/billing/revenue-recovery/customer-emails#test-your-configuration
Happy to help.
hey, just one last thing, I just checked the customer log and does stripe not even log emails sent in test mode?
What do you mean by "customer log"?
in the link you sent,where we can see all the activity of a customer
emails sent are also logged right?
that log is empty in test mode
Could you please share a link/screenshot?
this is the customer id in test mode cus_RGRWC91ncSVP08
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.