#bazylh-invalid-request
1 messages · Page 1 of 1 (latest)
Hi there! Can you share the request ID that you redacted?
It isn't sensitive
Then I can look at exactly what is happening
However, that error isn't related to automatic_payment_methods at all
It is simply saying you are confirming a PaymentIntent without there being a PaymentMethod associated
Are you confirming server-side?
Yep so you see how you have confirm=true
That means you are trying to create a charge, but there is no PaymentMethod
def create_stripe_intent(stripe_account_id, customer_id, metadata):
amount.
return stripe.setupIntent(
customer=customer_id,
metadata=metadata,
on_behalf_of=stripe_account_id,
)```
So we need to get the users card info so that if they run off with a rental we can charge their card. Before we were using the hold system, but realized their are too many cases where the price goes over the initially held amount. So we decided to use future payment intents scheme instead. We want to save a generated customer id to store card info, require they go through checkout on a setup intent, and then charge them the final calculated amount from our backend directly post transaction
Okay and where in that flow are you running into issues above?
Like is that when you have the Customer and PaymentMethod and are trying to charge them?
We are getting this error when we end the transaction with our apis
is this because no one has gone through checkout in the mobile app on them yet?
Is that the piece that assigns payment_methods?
The initial collection of the PaymentMethod using the SetupIntent is what creates the PaymentMethod itself.
Then, you pass that PaymentMethod ID to the PaymentIntent when attempting to actually charge the PaymentMethod
So yeah it sounds like you haven't actually collected a PaymentMethod yet
PaymentMethod can be collected directly through the Stripe mobile SDK?
Yep
You shared the guide above that walks through how to do that
When you say "directly through", you do still need a backend but you would collect the PaymentMethod itself on the frontend using the SDK
Got it. Yes but after the got through PaymentSheet on the mobile app we will then have the payment mehtod we need for the backend