#sambindoff
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Hey Vanya, thanks very much for your time
Could you please share the Request IDs that. are failing req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Sure, for the first error:
The parameter `moto` cannot be passed as part of `payment_method_options` unless the SetupIntent is being confirmed.
Request - req_ukTZ8VRDrLFYYZ
Can you try this, or without payment_method_options at all:
const setupResponse = await this.stripe.confirmSetup({
elements,
confirmParams: {
payment_method_data: { payment_method_options: { card: { moto: true } } },
},
redirect: 'if_required',
});
For the second:
You cannot confirm this SetupIntent because it's missing a payment method. Update the SetupIntent with a payment method and then confirm it again.
Request - req_rYbys5bDAJTtWm
Let me give your suggestion a try
I'm now seeing:
Received unknown parameter: payment_method_data[payment_method_options]
Request - req_YbjQ1FdGk8iU9o
Thanks for the details!
I haven't seen moto being used for SetupIntents, so please give me some time to investigate.
No worries, thanks Vanya
The general expectation with MOTO is that you need to create the PM/tokenise before you create the PI/SI: https://stripe.com/docs/payments/payment-intents/moto#future-payments
Now that is more difficult with the Payment Element as there's no direct createPaymentMethod available
What you need to do is follow this deferred flow: https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=setup
The idea being you collect payment details first, and then create the Intent
You can pass the paymentMethodCreation parameter to your PE instance, and then call createPaymentMethod that way: https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=setup#additional-options
That will give you a pm_xxx you can use when you create the SI, and pass the MOTO params
A few things to glue together there, but it should work
MOTO is weird because it's a rare instance where you're obviously keying in card details for the user, but still want to use our payment UIs for PCI compliance
That's great, just hopped on another call so will give all this a go shortly, thanks a million ynnoi and vanya, will feed back any issues