#tamires_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1254788675821109372
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
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.
The provided PaymentMethod cannot be attached.
To reuse a PaymentMethod, you must attach it to a Customer first.
These 2 error messages were thrown to the same customer cus_O9bv5onrjKrHqI. after they had some failures with a CC that was attempted too many times and a CC that was 3DS
I am not sure what we are supposed to do. Should we update the customer default payment method to clear these error or maybe just unlink them and leave them all under source, but none under customer default??
Hi there ๐ that error indicates that the Payment Method you're trying to use was already fully consumed and can no longer be used. Can you tell me more about the flow you're trying to build so I can advise on the adjustments you need to make to avoid it? Are you trying to collect payment method details one time, and then reuse the resulting Payment Method repeatedly for payments? If so, how are you creating the Payment Methods as part of your new flow?
There are many things I cal tell, I'm trying to narrow it down to the source of the problem tbh.
So, I have a question: we currently have not implemented 3DS ui interface for customers to authenticate, it's in ourroad map though.
In the meantime if a customer checks out with a 3DS the status of the payment intent is pending action but our customer just sees that we have declined the payment.
If they were to try to pay again with the same card, would would we experience the messages above - because there are open payment intents with the same payment method?
if it helps, our flow is: we collect the payment method token in the front end and process all of the rest in the server - payemnt intenti creation and confirmation, customer creation, etc
It sounds to me like the Payment Methods aren't being set up for future usage, so they're likely being dropped after a single use.
hm, how do you set up that?
I have, in the payment intent, the setup for future usage flag set.
It doesn't sound like you're using Setup Intents here to prepare the payment methods for future usage, so on the first Payment Intent are you setting setup_future_usage to the appropriate value for your flow? Either off_session if you plan to reuse the Payment Method for off-session payments, or on_session if your Customer will be on-session for the subsequent payments.
https://docs.stripe.com/api/payment_intents/create#create_payment_intent-setup_future_usage
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I do, I have the setup_future_usage:off_session in the payment intent
it seems to me that is relates more to the existing and old default payment method the customer had conflicting with some pending payment intents somehow
you can verify by seeing the customer I linked above, customer cus_O9bv5onrjKrHqI
but after the pending payment intents of this customer (the 3ds ones pi_3PUWhsKIWnXaN5iw1KGwOTjd and pi_3PU827KIWnXaN5iw1ahEjDyW) that's when I started to experience the error messages first linked about pm attachement to the customer
Sorry, the server has gotten very busy, I'll be back shortly to take a closer look at what you're sharing.
Those payment intents aren't using the same Payment Method, this doesn't strike me as having anything to do with previous payment methods so far.
I see these are livemode payments, are you testing this in testmode and making sure the flow works as expected before trying to run live payments through it? I'm not readily spotting recent requests generating the error you shared.