#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/1283036430821756941
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- evan_api, 23 hours ago, 28 messages
this is a reference for a previous closed thread #1282669074769248379 message
the approach we have is not loading a payment intent on page load
is bascially providing paymentMethodId for the selected PM of the user
got it. do you have a link where I can reproduce the issue?
I do not think I can share link publicly here.
But this a subscription ID i did
sub_1PxT18D9sYh65PYttsxcbWCz
I did it using normal cards because wechat, alipay were not showing
then can you share the frontend code used for the PaymentElement?
pi_3PxT19D9sYh65PYt0x2oxNzR
note that wechat pay doesn't work for subscriptions. and alipay is invite only sur subscriptions: https://docs.stripe.com/payments/payment-methods/integration-options#support-wallets
so if you don't see wechat or alipay for subscription payments, that's expected.
this is the payment intent for that subscription
you cannot use wechat pay for subscriptions. and for alipay you would need to contact support to request access.
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
so since the mode in the options here is
mode: 'subscription',
Then it will not show
correct
do you suggest any other workarounds if we want to use alipay or wechat on subscription basis for our users?
wechat pay is not supported for subscriptions. for alipay you would need to contact support to request access: https://support.stripe.com/contact
happy to help ๐
one thing
sorry before closing
regarding the image you sent
it shows that alipay and wechat are available for the payment element
which is the component I am using
and there is another column for subscriptions
which seems confusing to me
if you are using the Payment Element for one-time payment, wechat and alipay will work.
if you are using the Payment Element for Subscriptions, wechat and alipay won't work