#yassineh

1 messages · Page 1 of 1 (latest)

native pumiceBOT
#

Hello! We'll be with you shortly. 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.

violet knot
verbal veldt
#

this seems complicated, my reason for getting the paymentMethode id is to store it in the parent stripe account's customer.. and use it to pay the connected account with a new customer (where i wont store the paymentMethod), is this the right approach for that

violet knot
#

ultimately most of what you're describing is backend actions so I don't think 'getting the PaymentMethod ID from the PaymentElement' is overall the right concern.
The PaymentMethod ID is always available, or example in payment_intent.payment_method after a payment, overall it depends exactly what code you have and what it's trying to do.

verbal veldt
#

the problem i have goes deeper, the current implementation creates the paymentIntent when the pay button is pressed, i have been trying to move to paymentElements

#

so i am guessing i would need to move the create payementIntent to before the pay button is pressed, but that would require too many changes, i am trying to avoid that

violet knot
#

yeah there are two ways of using the PaymentElement, one where you create the PaymentIntent before loading the page, and one where it can be defferred until after the user completes the PaymentElement form. You can use the 'deferred' flow, it's what my earlier link about a "two-step confirmation" does.

verbal veldt
#

perfect, i will do that, and hopefully not comeback to disturb you hahahhaha, thank you for your time

#

one last question, i am guessing not all payment methodes are savable?, if so, how can i display the "save payment method" switch input conditionally with a paymentElement

violet knot
#

unfortunately I don't think there's a good way to do that when using the 'deferred' integration since we don't support all the options you'd need

verbal veldt
#

ok, say i only want customers to store cards

violet knot
#

but I don't think you can do that for the deferred flow since it doesn't support the options to pass that, it only accept an overall "setupFutureUsage" so it's all-or-nothing(if you set it, non-savable payment methods types just don't appear). It's a product gap we're aware of.

verbal veldt
#

ok a question about "setup_future_usage", does it store the paymentMethod in the customer payementMethods list, and what about connected account's customers, does it store the payementMethod in both customers?

violet knot
#

does it store the paymentMethod in the customer payementMethods list
yes

#

what about connected account's customers, does it store the payementMethod in both customers?
no, it doesn't do anything specific to Connect. It would save the PaymentMethod to the Customer whose ID you pass to customer when creating the PaymentIntent(on whatever account that is).