#vatron_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1259939263911428207
đ Have more to share? Add details, code, screenshots, videos, etc. below.
when i used to use payment methods configuration - If i enabled all payment methods and just pass in pmc it to the stripe payment element , the loading would not fail and it would just load the valid payment methods for that time
Here my use case is that I'll pass in card, klarna, ideal to payment method types and based on the currency stripe should just show the valid payment method but here it just fails !
Are you explicitly passing in the payment method types to the Payment Element as mentioned here? If so, why?
What use-case? You don't need to explicitely pass it if you're using a PMC. In any case, if you must, then you'd need to ensure that those payment method types don't include invalid payment method types. The Payment Element doesn't infer whether you meant to pass an invalid type or not
yeah i don't want to use pmc at all ! okay next question being cad is supported by klarna why do i get this error for klarna and cad amount ?
Also then how do i get all available payment method types for an accountId, mode(test or live), amount and currency ?
What api to use for it ?
Automatic payment methods is what to use if you want us to automatically filter based on currency and such
When you manually specify payment_method_types, it is expected that we will error if one of them is not compatible with the payment that you specified
You can't directly query supported payment method types via the API. You can create a PaymentIntent with your desired shape and auotmatic payment methods turned on, but unfortunately there isn't really a lighter weight way to do that
no my use case is different i don't want to maintain 'n' number of pmc so i instead want to use payment_method_types, so for one of my connected account if i want to know the supported currencies you are telling me there's no way for it ?
Creating a payment intent just to know the supported payment methods for that account ,currency and amount isn't the right approach !
Can you tell me more about what you are trying to do with this list of payment methods?
And do you mean supported settlement currencies, supported presentment currencies or both?
Unfortunately much of this info is not accessible via the API. I understand why it would be helpful to be accessible, but right not it isn't so we do need to work within those bounds. I agree that making that many PMCs isn't feasible, which is why I didn't suggest that. I just want to set expectations
Yeah right - ( we are currently using pmc's but creating and maintaining more and more is what we don't want to go ahead with ! )
So is there any workaround / suggestion for our use case ?
I'll reiterate my usecase ->
- We'll be using payment_method_types and not use pmc's at all.
- Let's say i pass in card, klarna and ideal to payment_method_types now in this case when amount is in usd the payment-element loading itself would fail - my expectation were that it would just ignore this and load just klarna and card.
- but since the above is not possible how do i get valid payment methods for a connected account for an amount and currency code ?
If i get the list of valid payment method types I can then use it for my approach !
What charge type are you using here? Is this direct charges or destination charges?
I'm currently not aware of a way to get this list programmatically outside of using automatic payment methods. I will double check but as far as I am aware we don't have a way to just input a currency and amount in the API and get a list of valid types
destination charges ( basically we have many connected accounts and for one of them i want to know in the list of payment method types )
Yes please let me know as soon as possible @kindred bane , this is a major requirement for us and proving out to be a blocker
I'm not finding anything else at the moment. I apologize but I am not quite clear on the need to make many new PMCs, wouldn't it be feasible to create a Connect PMC with all payment methods turned on and then use that to create an intent on each account? Or is there a restriction that I am not thinking of that requires you to make new ones
@kindred bane will discuss that in detail later.
Another question why i think got lost in the above chat is why is the request failing for klarna ? , klarna supports cad currency still !
Good question, looking in to that. CAD support may be country specific or something similar
Ah yes, that looks to be it. We only support CAD klarna payments on canadian accounts. It looks like that acct_1Ihw53CScnf89tZo account that you passed is a US account. https://docs.stripe.com/payments/klarna#payment-options