#fr00shy_code

1 messages ยท Page 1 of 1 (latest)

hollow pebbleBOT
#

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

twin hinge
#

Hi there

#

Can you share what kind of Connected accounts your'e working with, as well as what charge type you're using?

quick cedar
#

Hello, I am working with Express accounts and the type of charge is just a one time payment

twin hinge
quick cedar
#

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,
        },
      },
twin hinge
#

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

quick cedar
#

Figured to send the connected account's email to receipt_email, no?

#

But I am already doing automatic receipts for customers

twin hinge
#

Aahh

#

It's not possible to set two receipt recipients

quick cedar
#

Oh I see

#

Like regardless of what sort of payment flow? Checkout or payment link?

twin hinge
#

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

quick cedar
#

Hmm I gotcha

#

If I did the PaymentIntent API instead of Checkout, there's still no way to send two receipt recipients, correct?

twin hinge
#

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

quick cedar
#

And this would be for await stripe.checkout.sessions.create or for the webhook after the purchase?

twin hinge
#

You'd wait until after the Session is completed/after the purchase

quick cedar
#

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

twin hinge
twin hinge
quick cedar
#

Sounds good, and so that update charge automatically sends the email when it is successful?

twin hinge
#

Correct

quick cedar
#

Awesome. Thanks for your help. I really appreciate this