#priya_code

1 messages ยท Page 1 of 1 (latest)

snow bloomBOT
#

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

vapid vigilBOT
#

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.

uneven schooner
#

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?

wary flicker
#

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?

uneven schooner
wary flicker
#

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?

uneven schooner
#

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.

snow bloomBOT
wary flicker
#

hmm for all is it like the account should be in the given currency to render?

uneven schooner
#

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

Use the Payment Intents and Payment Methods APIs to accept WeChat Pay, a digital wallet popular with customers from China.

wary flicker
#

is this the case for Alipay as well?

#

doesn't it do the conversion?? Also, I am anyways sending EUR. It should support.

uneven schooner
#

What is the ID of the Stripe Account you're using to initialize the Payment Element, it should start with an acct_ prefix?

wary flicker
#

pk_test_L5kEouRkC47c7pYHhZS8wYer

uneven schooner
#

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.

wary flicker
#

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 ?

uneven schooner
#

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?

wary flicker
#

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?

uneven schooner
#

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.

wary flicker
#

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.

outer thunder
#

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?

wary flicker
#

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.

outer thunder
#

Yeah, is the host going to have a connect account or no?

wary flicker
#

yes

#

isn't it possible to use dynamic payment method with an option to explicitly disable a method
?