#evan_api
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/1282669074769248379
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
I can see that the Payment element is picking the right region with the help of the VPN as well and automatically selects China
Hi, let me help you with this.
Could you please share the PaymentIntent ID pi_xxx?
First idea: the amount might be too small.
paymentMethodId
pm_1Px6LMD9sYh65PYtBPehkW2V
can you share the code you use to initialise the Stripe library create and mount the PaymentElement on the frontend?
do you have a link to the page you're testing on so I can try it?
const SubscriptionForm = () => {
const { checkoutData, selectedPlan } = useAppSelector((state) => ({
checkoutData: state.checkoutView,
selectedPlan: state.subscription.selectedPlan
}))
const options: StripeElementsOptions = {
mode: 'subscription',
amount: parseInt((selectedPlan.price * 100).toFixed(0)),
currency: selectedPlan.currency.toLowerCase(),
paymentMethodCreation: 'manual',
appearance: {
theme: 'stripe',
variables: {
colorPrimaryText: '#EAAA00',
colorPrimary: '#EAAA00'
}
}
}
return (
<Elements stripe={stripePromise} options={options}>
<ElementsConsumer>
{({ stripe, elements }) => (
<CheckoutForm
stripe={stripe as Stripe}
elements={elements as StripeElements}
checkoutData={checkoutData}
selectedPlan={selectedPlan}
/>
)}
</ElementsConsumer>
</Elements>
)
}
export default SubscriptionForm
Unfortuantly I can not share the test platform here
what currency is selectedPlan.currency.toLowerCase(),?
this resolves to usd
the currency of the subscription plan the user Selects
and after double checking I can see that it resolved to usd which should be compatiable
then that's why, you're a GB Stripe account, so you can only use Wechat with gbp or cny https://docs.stripe.com/payments/wechat-pay#supported-currencies
same for Alipay https://docs.stripe.com/payments/alipay#supported-currencies
it's local currency, or cny
yes โ for Stripe accounts located in the US