#thai_invoice-lpm
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/1424809704391184475
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
perfect, looking
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
All good, just digging. I see for example that this is a "Direct Charge" flow of funds where the request is made directly on the connected account but you don't seem to have enabled/configured Alipay or Wechat in your Connect PaymentMethodConfiguration. You need to visit https://dashboard-admin.stripe.com/settings/payment_methods/connected_accounts and make sure you turn those on
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
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
the first one is OURS ... the second one is the connected account
this is FLUID
this is the connected account
so both are on
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
visit this: https://dashboard.stripe.com/acct_1PAO5l2MNxbBK4T1/test/settings/payment_methods
it should show other payment method configuration. Can you share a screenshot of that page?
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 ๐
so when i clicked on that ... this is what i get
not sure what i should even do next
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
Ah thanks, didn't realize that. Next step will be to contact our support team and ask how to enable support for this in that case: https://support.stripe.com/contact
even for sandbox?
Correct. If it worked in Sandbox then you'd be shocked when you go to production and it fails
https://docs.stripe.com/payments/wechat-pay#connect mentions this is supported but requires access so that's the next step!