#priya_code
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/1237425134311313498
๐ 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.
- priya_code, 5 days ago, 24 messages
- priya_code, 5 days ago, 29 messages
Hi ๐ can you tell me more about what you're trying to do, is this a deferred intent Payment Element integration that you're working on?
I am trying to render the Payment Element and send the payment methods using a pre defined array of strings that I am determing beforehand.
export const PaymentInfo = () => {
const { listingWithOrderItemTypes, paymentMethods } = checkoutStore;
const options: StripeElementsOptions = {
mode: 'payment',
amount: zeroDecimalize(
orderStore.estimate?.costBreakdown?.payment,
listingWithOrderItemTypes?.src_currency.toLowerCase()
),
currency: listingWithOrderItemTypes?.src_currency.toLowerCase(),
paymentMethodCreation: 'manual',
payment_method_types: paymentMethods?.slice(),
};
return (
<Elements stripe={stripePromise} options={options}>
<CheckoutForm />
</Elements>
);
};
The moment i replace paymentMethods?.slice() with ['card'] it loads up correctly.
This is how it looks like in console. I think it is in correct format of array of string. Why is it not loading up then?
The variable is named paymentMethodTypes, does it behave as expected if you swap to that instead of payment_method_types?
https://docs.stripe.com/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodTypes
yep. same
Also I see that if I add ['ideal', 'three_d_secure', 'wechat_pay', 'card'], even then it's throwing same error. I see that if i remove wechat and three d secure. it loads up but why?
The currency sent is EUR. It should support right?
three_d_secure isn't a payment method type
I'm not sure about wechat_pay, I'll likely need more specifics about the country of your account.
hmm for all is it like the account should be in the given currency to render?
Maybe? I'm not quite sure I'm parsing the question correctly. There are currency limitations for some types of payment methods, that can depend on the country of the account collecting the payment. WeChat is one of those, and the supported currencies table for that can be found here:
https://docs.stripe.com/payments/wechat-pay/accept-a-payment?ui=direct-api#supported-currencies
is this the case for Alipay as well?
doesn't it do the conversion?? Also, I am anyways sending EUR. It should support.
What is the ID of the Stripe Account you're using to initialize the Payment Element, it should start with an acct_ prefix?
pk_test_L5kEouRkC47c7pYHhZS8wYer
Supported currencies for Alipay are also country dependent and listed here:
https://docs.stripe.com/payments/alipay#supported-currencies
The country of your Stripe account prevents you from using eur as the currency for WeChat and Alipay, you would need to use gbp instead.
The currency provided (usd) is invalid. Payments with alipay support the following currencies: cny, cad.
So if I am getting this correct cny is any currency so if we have any currency apart from cad we need to send cny?
But also there are multiple payment methods rights, I cannot specify for each ?
If you're seeing cny and cad, then you're likely using another account aside from the one shared. Yes, you can either accept cny that is supported for all countries, or you can use the local currency specific to your Stripe account. You're also correct that you can't specify a currency per payment method type.
What are you trying to accomplish here? Is there a reason you're trying to explicitly control payment method types instead of letting Dynamic Payment Methods handle that for you?
So the thing is I have certain payment methods disabled. I need to remove those and show all other payment methods for the specific currency. How can i do that using dynamic payment methods?
When you say they're disabled, that's in your dashboard settings? If so, Dynamic Payment Methods should automatically suppress those. It will also automatically suppress payment method types that are enabled but don't support the currency you specify.
There are not account specific but specific to our listing. The user can disable in our app and we need to accomodate that change.
Not in stripe dashboard.
Hi there ๐ taking over, as my colleague needs to step away
To answer your question: are you saying you want Connect accounts to be able to select the Payment Methods they support? Or end-customers?
ok lemme explain it again. The host has disabled wechat payment method for his listing. The fan comes and tries to buy the ticket then they should not see wechat as an option.
Yeah, is the host going to have a connect account or no?