#cr_code
1 messages ¡ Page 1 of 1 (latest)
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.
- cr_error, 1 day ago, 10 messages
đ 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/1225100050137485382
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
So for example:
it shows three payment methods: Card, iDEAL and bancontact
I want to use Elements from Stripe, but payment method part i want to code myself. so in the backend i want to know which payment methods are available for particular currency, amount and locale
So that i can show them on the view accordingly
We don't have an API just for checking the payment method types. If you create a payment intent with the same parameters, you would get the right payment method types, but that does kind of defeat the purpose of rendering the payment element first.
I can put in feedback but we don't have a way to check this at the moment.
is it possible to generate a PaymentElement for only one payment method?
e.g. only for iDEAL
Yes, you can set a manual list of available payment methods when initiating elements https://docs.stripe.com/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodTypes
Ok i will try this out, maybe there is some way to do this.
im basically trying that I myself provide payment methods, and when a user , clicks on Card, it renders Card acceptance Element. and when they click on iDEAL, it renders this element. all dynamically
Interesting, as in your are building the individual non-payment element integrations for each payment method?
yes
Gotcha, trying to think of anything else that may help here
idea is that, for example I have a direct contract with iDEAL
so i will have option to accept iDEAL via Stripe vs via myself directly with iDEALs api
and before generating the checkout page, i want to decide whether i wanna use Stripe for it or direct api in the backend based on several factors.
if the decision logic results in Stripe, then when the user clicks on iDEAL it generates Stripe Element for that.
else if the decision results in Direct API then when the user clicks on iDEAL it generates a custom iDEAL form.
Gotcha, as far as I know the only way to get this info on your backend would be to create a payment intent and specify payment_method_types: ['ideal']. We will error out if the payment config doesn't support iDEAL
that would require me to create so many paymentintents.. one for each method, no?
or i create single intent with multiple methods, and it returns only the available ones?
Yeah, if you are making payment intents with the same configuration, you only need to check what payment methods are available once.
Ok interesting.