#nickdnk_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/1486399397418766457
๐ 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.
- nick_connect-pmc, 1 day ago, 87 messages
- nickdnk_api, 5 days ago, 24 messages
There also seems to be no clear way to map capabilities to payment methods, as things like card map to card_payments (PMC vs. capability), if I were to use the capabilities API.
hello! looking now
looking at the API ref and it seems to say what i also remember being true, which is
[payment method].display_preference.value shows you whether that payment method is "on" for that PMC
https://docs.stripe.com/api/payment_method_configurations/object#payment_method_configuration_object-affirm-display_preference-value
[payment method].available shows you if that payment method will actually be shown after taking capabilities into account
https://docs.stripe.com/api/payment_method_configurations/object#payment_method_configuration_object-affirm-available
so the short version is available should be the source of truth as to whether or not something can currently be shown
Okay, so I need to first update the PMC on Stripe, then read the .availabe property again after setting display_preference
I would suggest adding "eligible": bool to this API, so it's clear whether the account is even capable of using the payment method or not. It would also mean I could just skip those payment methods entirely when I read from Stripe's API. RIght now I have to "whitelist" the array of payment methods to those I know our accounts are capable of using, based on region/currency etc.
It adds a lot of manual overhead and mainteance for something stripe should be perfectly capable of maintaining
Unless this API only returns payment methods the account can use?
sorry for the delay, juggling a few things atm
np
looking at your most recent questions now
Unless this API only returns payment methods the account can use
i just ran some quick tests to see if it returns different values for merchant accounts based in different countries and it looks like it does, although i have to admit i'm not 100% sure what the precise logic is there
Okay, so if a capability is "not requested", which (as I understand) it will be (?) if I set the display_preference to on? Or do I also have to know exactly what capabiliy to request for the account and then request it?
MobilePay, for instance
Sorry let me reword that
If I set the display preference to on for something that does not yet have capability, but it actually is capable, just not "requested" - does it automatically request it?
capabilities are distinct from display preferences - i think the dashboard does some magic to automatically request the capabilities in some circumstances, but i am pretty sure if you just update the PMC directly via the API you still need to request the underlying capability separately
let me double check that though
So that brings me to: How do I know which capability is required for each payment method?
If I knew, I could request from both endpoints and compare them to know what to do
sorry for the slow response - been doing some research
no worries
i don't think there's a super easy way to map capabilities to payment method types unfortunately, it looks like the [payment method].available property was actually added semi-recently (in geological time) to address that very problem of making it easier to tell which payment methods are available
but that doesn't necessarily make your life easier since you're trying to request capabilities for people
Yea but you've mixed preference into available, which makes the property pretty hard to meaningfully use
Hence why I suggsted this
"I want to use" should be a separate boolean from "can I use" - "can I use" is what I need to know
Am I correct in understanding that I have to then update the PMC, read back the new, presumably updated .available state and use that to determine if available?
yeah, in the current state of things that sounds about right
This needs some rethinking on your end I think ๐
but I'll work with that for now then
I will try and do some manual "if user requests payment method X, ensure capability is requested for it"
Is there anywhere I can read about the enums for capabilities? The docs just say this: https://docs.stripe.com/api/capabilities/list
There should be an exhaustive list of capabilities and what they are required for
the account object has some details on it:
https://docs.stripe.com/api/accounts/object#account_object-capabilities
Ah yea
So I am assuming that capabilities on the account only returns capabilities that can be enabled?