#mattjsant-setup-customer
1 messages · Page 1 of 1 (latest)
hey there, can you please share an example payment method / setup attempt ID that i can look at?
pm_1JyeKvEczkt7rGnqGWxu86Fs - this is a recent one, cant even find it on stripe's dev dashboard
but we have the initial response
"data" : {
"id" : "pm_1JyeKvEczkt7rGnqGWxu86Fs",
"object" : "payment_method",
"billing_details" : { .........
here is an example with google pay where the payment method exists but it has no customer attached to it : pm_1JyXfJEczkt7rGnqh08Vqh2D - this is the associated payment intent id : pi_3JydxgEczkt7rGnq0ABxrZcP
We often see this error but we are not sure if its a generic message
invalid_request_error
The provided PaymentMethod was previously used with a PaymentIntent without Customer attachment, shared with a connected account without Customer attachment, or was detached from a Customer. It may not be used again. To use a PaymentMethod multiple times, you must attach it to a Customer first.
So that's declined because of insufficient funds, the request for that PM
When you're first savings these payment methods, are you making sure to do so setting up for future usage? I don't see a such a setup for this PM
We call this method this.stripe.setupIntents.create({ customer, usage: 'off_session' });
so its should be setup for future usage
Sure, but if that how the payment method ends up being created? How are you collecting the payment method after that?
im looking into it
seems like you are right we are using the call GooglePayPaymentMethodLauncher.present(currencyCode: String, amount: Int = 0, transactionId: String? = null)
but this is not using the client_secret which has the setup intent
I guess we should be using the GooglePayLauncher.presentForSetupIntent(clientSecret: String, currencyCode: String) instead
but this one doesnt return a paymentMethodId
@long blaze reading up one sec
but this one doesnt return a paymentMethodId
what is the full object returned on calling that function in Android?
It seems like only an enum kind of object https://stripe.dev/stripe-android/payments-core/com.stripe.android.googlepaylauncher/-google-pay-launcher/-result/index.html
but I am thinking we can then get the setup intent again from Stripe's API and we will have the payment_method object set to a value after that Android call
ah yeah GooglePayLauncher only gives you an enum back yeah, I forgot that part. So yeah you'll have to keep your SetupIntent ID around and you can retrieve it from your server to see what PaymentMethod ID was attached to it
thanks will work on that tomorrow! 🙂