#cr_code

1 messages ¡ Page 1 of 1 (latest)

hidden pumiceBOT
split driftBOT
#

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.

hidden pumiceBOT
#

👋 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.

void compass
#

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

split driftBOT
rugged valve
#

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.

void compass
#

is it possible to generate a PaymentElement for only one payment method?

#

e.g. only for iDEAL

rugged valve
void compass
#

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

rugged valve
#

Interesting, as in your are building the individual non-payment element integrations for each payment method?

void compass
#

yes

rugged valve
#

Gotcha, trying to think of anything else that may help here

void compass
#

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.

rugged valve
#

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

void compass
#

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?

rugged valve
#

Yeah, if you are making payment intents with the same configuration, you only need to check what payment methods are available once.

void compass
#

Ok interesting.