#cute_lynx_31904

1 messages · Page 1 of 1 (latest)

floral joltBOT
snow fern
#

Did you set a email for the customer?

wary saffron
#

hi @snow fern i have included the customer_email but not sure if it is used to trigger a receipt. Here is my checkout.session.create object:

const checkoutSession = await stripe.checkout.sessions.create(
    {
      mode: cart.cartType === 'standard' ? 'payment' : 'subscription',
      line_items: lineItems,
      success_url: `${config.web.baseUrl}/checkout-confirmation?checkout=${cartId}`,
      cancel_url: `${config.web.baseUrl}/${cart.username}?cart=true`,
      ...(cart.cartType === 'subscription'
        ? {
            subscription_data: {
              application_fee_percent: FEE_PERCENTAGE * 100,
            },
          }
        : {
            payment_intent_data: {
              application_fee_amount: cart.fee,
              receipt_email: customerEmail,
            },
          }),
      customer_email: customerEmail,
      client_reference_id: localCheckoutSession.id,
      metadata: {
        cartType: cart.cartType,
      },
    },
    {
      stripeAccount: connectedAccountId,
    },
  );
snow fern
#

Ok. it looks good to me. Please note that no emails are sent in test mode.

wary saffron
#

yes ive tested in live mode and no reciepts are being sent 😦

snow fern
#

what's the checkout session ID?

wary saffron
#

cs_live_a1PNKeomyEeufyM5Cma9QqxtPeRO6pJpKkp7rJroBeZFEaV7wN9cm2dqVY

snow fern
#

The receipt was sent on Nov 7th 2023 7:12:56 am
and the title of the email is Your receipt from Prezz #2455-8702

wary saffron
#

yes i had manually sent it

#

through the dashboard

#

is it possibly to automatically send it like with payment_intent_data: { receipt_email: ... }

snow fern
wary saffron
#

yep its all enabled

snow fern
#

No it's not enabled in the connected account.

#

Since it's a direct charge, it should be enabled in the connected account.

wary saffron
#

ohh let me see. how would i enable it for the connected account?

snow fern
#

The account need to log into their Dashboard to enable it

#

Hmm, wait, it

#

it's a express account. You shouldn't use direct charges on a express account.

#

You should use destination charge instead.

wary saffron
#

can you provide some documentation on this?

snow fern
wary saffron
#

is this the reason for no email or does it still have to be enabled on the express account

snow fern
#

i'm not usre if express dashboard has a settings for email.

#

The main reason that you shouldn't use direct charges for express account is that they don't have full dashboard access and they can't manage disputes

wary saffron
#

hm ok but the current way is still valid and receipt emails should still work?

#

with subscription mode on the checkout session you cannot use payment_intent_data anyways

floral joltBOT
snow fern
#

if the " Successful payments" settings is switched on in the connected account's dashboard, then yes.

wary saffron
#

Im not sure where this setting is? I go to their account, then "View dashboard as ..."

main solar
#

it makes no sense to do this for Express really, this is why Direct Charges on Express is not recommened

#

that is not a 'real' dashboard that the user themselves have access to, and as you see, you can't access all parts or all settings, so it's just not possible to do this. Generally you'd use Destination charges and manage everything in your platform instead.

wary saffron
#

ok i see

#

there is an issue with not being able to create a customer portal for customer's existing on connected account until i manually go in and save the customer portal settings in the connect account. is this right?

main solar
#

hmm not sure, kind of rings of bell with needing to enable something

wary saffron
#

yes it says to save the settings first

main solar
#

but again overall this is not what Express accounts are designed for; if the customer is being charged directly by the connected account and managed by them you'd use Standard + Direct

#

I'd say that's just a limitation of using Express + Direct again then, as I said we don't recommend that integration path

wary saffron
#

ok i might have to revisit that then