#denjaland_api

1 messages ยท Page 1 of 1 (latest)

gusty hollyBOT
woeful skyBOT
#

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.

gusty hollyBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

ember grail
#

Hi again. I'm struggling with our setup.
Basically what we have done so far is create an endpoint GET /payment-methods which returns a list of already attached payment methods to a customer object, and a list of payment methods (cards, bancontact, ideal) that we support

#

this allows me to display the following form already:

#

next step was having user select either the attached payment method (the visa card on top), or another method

#

when doing so, I post to my internal POST /payment-intents which delegates the creation to you

#

now I want to create a payment method that only works for the actual attached payment method OR for the selected payment method (cards/bancontact/...)

halcyon nest
#

What happens when you don't specify automatic_payment_methods?

ember grail
#

let me try that again - hold

#

pi_3PLqAGGKxB0cix7714Sp03lF has been created

#

and it appears it's okay for the actual payment method - let me tru and create one for bancontact

#

well then it has this:

#

so it appears that when I create a pi for an attached pm, I need to only pass payment_method

#

ah no

#

sorry

#

let me try something first

#

alright - looking better:

#

I can move on for now - thanks for the pinpointing

halcyon nest
#

Sure thing! Feel free to pop back in if you get blocked again

ember grail
#

one more question just to be sure

#

once I have the payment intent created, I can use the payment element to have stripe deal with the rest, right?

#

or will we still need seperate implementations on that front?

halcyon nest
#

If you have Payment Methods saved already, you don't need the Payment Element, right? You just create the Payment Intent and call it good, no?

ember grail
#

there is never two factor auth on such payments?

#

if it's on_session for instance?

halcyon nest
#

There might be for on-session payments, but if you used Setup Intents to setup the Payment Methods for future payments, then you would try to create the payment off-session then (if it fails) bring the Customer back into the payment flow for an on-session payment

ember grail
#

okay but just in my case - we want to allow the customer to for instance "top up their accoujt" as well in which case it's a user action - when he clicks "top up" we want to present the payment options (his attached PMs as well as the other options we accept) - he chooses, and then we basically want to proceed with the charge

#

funny thing - when we use the pi linked to the payment method and use that to go to the cards elements, we get this:

#

so we definitely can't use the elements I guess ๐Ÿ™‚

halcyon nest
#

You would need to divide that UI up a bit. You could present them with all their saved payment methods, then have a link for something like "+Add new payment method" that takes them to the Payment Element (or just unhides/displays it)

ember grail
#

that sounds like a good plan indeed.

ember grail
#

one final question - I just noticed that - for some reason - I was able to add the same credit card and attach it to one customer twice - is this test related, and will this not occur in production?

halcyon nest
#

Stripe doesn't stop you from duplicating Payment Methods, so (if you want to dedupe) you would need to check if they entered the same card after the Payment Method is created, then delete/unattach one.