#fr00shy_code
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/1265439013121294356
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
Can you share what kind of Connected accounts your'e working with, as well as what charge type you're using?
Hello, I am working with Express accounts and the type of charge is just a one time payment
Gotcha. As for charge type, understood that you're using one-time payments but since you're working with Express accounts, I assume this means you're using either destination charges or separate charges & transfers
https://docs.stripe.com/connect/destination-charges
https://docs.stripe.com/connect/separate-charges-and-transfers
Yeah sorry, it's a destination charge:
payment_intent_data: {
application_fee_amount: Math.round(applicationFeeAmount * 100), // Application fee amount in cents
transfer_data: {
destination: artistStripeAccountId,
},
},
In both of these cases, the charges occur on your platform account. You'll need to write the logic to send an email about the purchase to the connected account yourself
You can use webhooks to determine when a Session has been completed and then have some handler code that sends an email with details about that payment to the connected account
Is there any way to do it natively? I was looking at this snippet on ths page: https://docs.stripe.com/receipts#:~:text=Stripe Connect receipts&text=Platform accounts can send a,configure receipt settings under Branding.
Figured to send the connected account's email to receipt_email, no?
But I am already doing automatic receipts for customers
Also, that section is specifically for users who integrate directly with the PaymentIntent API. When using Checkout, we create the PaymentIntent automatically so it's not possible to update receipt_email on PI creation
With Checkout, we look at the "Email customers for successful payments" setting in the Dashboard. In this case, we're looking at your platform account's settings
Hmm I gotcha
If I did the PaymentIntent API instead of Checkout, there's still no way to send two receipt recipients, correct?
Hm, actually
It's messy but one way you can handle this if you're attached to using Checkout is to send emails automatically based on the "Email customers for successful payments" setting. Then, update the underlying Charge to set a value for receipt_email. If the Charge's receipt_email property is not null, you'll need to make two calls: one to update the receipt_email to null and a second to set a value for receipt_email
And this would be for await stripe.checkout.sessions.create or for the webhook after the purchase?
You'd wait until after the Session is completed/after the purchase
Understood and then after setting the second value to the new receipt_email, would I have to do anything else? I assume its that update charge endpoint?
Lastly, what options do I have if I am not attached to using Checkout? Sorry for all these questions, just want to make sure I take everything into account before making a decision ๐
Correct, it's the update charge endpoint: https://docs.stripe.com/api/charges/update#update_charge-receipt_email
Note that if this field is already populated on the charge, you'll need to set it to null first and then make a second update call in order to trigger an email
If you use the PaymentElement and PaymentIntent, you can pass a receipt_email value when creating the PI to send an email to the customer first, then do the same "Update the Charge" flow above to update the email to send the receipt to the connected account.
Sounds good, and so that update charge automatically sends the email when it is successful?
Correct
Awesome. Thanks for your help. I really appreciate this