#k3davis-moto-setup-intent

1 messages ยท Page 1 of 1 (latest)

neon citrus
#

Hello ๐Ÿ‘‹
Give me a moment to catch up here and I'll respond as soon as I can ๐Ÿ™‚ Thanks

lucid crescent
#

np

neon citrus
#

can you share the request ID for the failed request?

#

and the code you're using to test this

lucid crescent
#

hi hanzo, i'm sorry i phased out on this thread, let me get the request id

#

req_wgWDEbCcGQeFKs

#

it seems like i have to somehow add the card at the same time as the request, which isn't what we normally do with the card element ui

neon citrus
#

I don't think SetupIntents can function without a payment method, yes?
Like what are we setting up for future usage exactly if we don't provide a payment method?

lucid crescent
#

i could be mistaken, but the non-moto flow i believe is that we create the setupintent and then use its client secret to link the payment method collected via stripe elements to it, and confirm it from the front end.

neon citrus
#

Right but in that case you can't confirm it right away

lucid crescent
#

right, but the moto docs say we have to confirm it right away. this is where i'm lost

neon citrus
#

that is if you want to do it in just one call

lucid crescent
#

oh, perhaps i misunderstood that part, it is optional to do it in one call? meaning i don't have to confirm at the same time. this statement seems ambiguous

Create and confirm a SetupIntent with a card collected via MOTO in one API call. When creating the SetupIntent, set payment_method_options[card][moto] to true and set confirm to true.

#

it sounds like that's the way to do it, not an option

#

but i can try without

neon citrus
#

I believe it is optional. Yeah I'd recommend giving it a go without confirm=true

lucid crescent
#

alright, i will try it. thanks!

#

that doesn't seem to work

invalid_request_error

The parameter moto cannot be passed as part of payment_method_options unless the SetupIntent is being confirmed.

neon citrus
#

AHHHH I really thought it would work ๐Ÿ˜ฆ

#

what if you don't pass in payment_method_options while creating the setup intent and you pass it while confirming it

lucid crescent
#

checking to see if i can find where that parameter exists in the confirm api call

#

ok, i see that, will give it a try.

#

i haven't completed the test yet, but the docs indicate the payment_method_options uses secret key only, we are confirming on the front end so i'm not confident that will work?

neon citrus
#

yeah I'm not really sure Stripe.js + moto is a supported usecase but just wanted to explore

lucid crescent
#

i'm happy to complete the test

neon citrus
#

Appreciate you taking the time to test out wild theories ๐Ÿ™‚

lucid crescent
#

Received unknown parameter: payment_method_options. Did you mean payment_method_data?

#

seems not

neon citrus
#

yeah ๐Ÿ˜ฆ hard luck

lucid crescent
#

any thoughts about what other tack we should take? idk even what options remain

neon citrus
#

don't think its supported with Stripe.js

#

you'd need to pass in the payment method at the same time

lucid crescent
#

and to do that i need to create the payment method on the backend first? or something else that is in pci scope

neon citrus
lucid crescent
#

i see, so not using card element, collect the fields raw. that's a bummer for pci but will take that approach next then.

#

unless there is a way with stripejs to create a payment method apart from a setupintent..?

clear oxide
#

Unfortunately I am not seeing another way here. It would probably be worth reaching out to our support team here, they should be able to connect you with the team that develops this functionality and they should have a better idea of how this flow works here. https://support.stripe.com/?contact=true

lucid crescent
#

it does look like i can create a payment method with stripejs, so i'm going to try creating a moto setupintent with a payment id created previously, unless you know that won't work.

#

i can explore that avenue and reach out to support if that doesn't work. thank you @neon citrus and @clear oxide for working through this with me, i appreciate your time and efforts.

clear oxide
#

Sounds good. Good luck figuring this out I know MOTO can be pretty tricky