#thai_invoice-lpm

1 messages ยท Page 1 of 1 (latest)

merry fractalBOT
#

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

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

warped crystal
#

const initialInvoice = await stripe.invoices.create({
customer: customerId,
default_tax_rates: taxRate ? [taxRate] : undefined,
application_fee_amount: Math.round(techFee * 100),
metadata: {
cartId: cart.id,
email: user.email
},
discounts: coupon ? [{ coupon: coupon.id }] : undefined,
}, { stripeAccount: stripeAccount.stripeId });

const invoice = await stripe.invoices.finalizeInvoice(initialInvoice.id, { stripeAccount: stripeAccount.stripeId });
await stripe.paymentIntents.update(invoice.payment_intent as string, { setup_future_usage: 'off_session'}, { stripeAccount: stripeAccount.stripeId });
const pi = await stripe.paymentIntents.retrieve(invoice.payment_intent as string, { expand: ['payment_method'] }, { stripeAccount: stripeAccount.stripeId });
if (pi) {
clientSecret = pi.client_secret;
}

return {
  clientSecret,
  stripeId: stripeAccount.stripeId
}

Then us that for the payment element.

civic spindle
#

thai_invoice-lpm

#

Can you share an exact Invoice id and PaymentIntent id?

warped crystal
#

pi_3SFI6j2MNxbBK4T11o5v4T0J

#

in_1SFI6i2MNxbBK4T1r6HyAE8W

#

this is test mode

civic spindle
#

perfect, looking

warped crystal
#

for context ... we're trying to get into China market ... the Stripe account is going to be in US but the app will accept payments in China

#

we already have all the localization done

civic spindle
warped crystal
#

this is the connected account

#

acct_1PAO5l2MNxbBK4T1

civic spindle
#

yeah you turned it on for their own payments but not for the ones controlled by your platform

#

there would be a different PaymentMethodConfiguration for your platform on that last screenshot

warped crystal
#

i mean this is what i see for the link u sent above

civic spindle
#

The link I sent is for your own Connect platform.

#

You shared a screenshot for that connected account Dashboard right? The one that says Default

warped crystal
#

the first one is OURS ... the second one is the connected account

#

this is FLUID

#

this is the connected account

#

so both are on

civic spindle
#

yeah sorry you aren't understanding what I am saying. This is super brittle if you ask me

Can you share the exact URL you are on for that second screenshot

civic spindle
warped crystal
#

should i click in the Default (Fluid PB configuration)

civic spindle
#

yes that is basically the default configuration for API requests made by your platform for one-time payments

#

I wish we changed the UI here, I have given that feedback repeatedly but haven't been able to convince the team yet ๐Ÿ™

warped crystal
#

so when i clicked on that ... this is what i get

#

not sure what i should even do next

civic spindle
#

So we're back to what I was saying. Your first screenshot was your own configuration where you have turned off those payment methods by default and don't let the connected account change this

So now you need to decide what you want exactly. Always off, always on by default, or off by default but some connected accounts can change the value

warped crystal
#

i dont even have the option to always on by default

#

is disabled

civic spindle
warped crystal
#

even for sandbox?

civic spindle
#

Correct. If it worked in Sandbox then you'd be shocked when you go to production and it fails