#tamires_api
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- tamires_api, 13 minutes ago, 23 messages
๐ 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/1254809187939123357
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hey, can you access and see the conversation in the previous thread?
I am trying to understand what is causing the error about payment method not attached to customer
I am not in a rush, just take the time to catch up ๐
Let me get that request id...
Thanks!
for example "request-id": "req_bNlitkyKq0AEe0"
Thanks, looking
Okay it looks like that error is a result of hitting the card_velocity_exceeded decline when previously using that PaymentMethod: https://dashboard.stripe.com/logs/req_v0UlsVTk5Txj1E
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I don't think you can reproduce this specific error in test mode
this same customer continued to try so we have many req for the same customer with this error
req_X2jbhdayzeEBgY
I believe it comes based on the issuer providing a specific decline that essentially tells us not to allow a retry
req_ME8nWvT1rIUg8s
Yep, it is all related to that PaymentMethod being charged too many times in quick succession
it is strange to me that we also do have the error where the pm was tried many times. Just later on that we started to have this error related to pm no tbeing attached to customer.
We do have other clients with the same error thought, let me get the client id and request error for the other clients
card velocity caused "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."
3ds pending confirmation caused "The provided PaymentMethod cannot be attached. To reuse a PaymentMethod, you must attach it to a Customer first."
Hmm can you share the request ID related to that second one?
sending a screen recording
req_IyByzOW9kvirv8
req_mFqMXoZO6Xyb0i
req_tVmmPqzTth240K
req_2Ea3UsP2HCXPPX
heads-up: this customer object has a default_payment that is different.
Yeah I would say overall the error message stating:
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
is confusing for this situation but it is basically saying that the card can't be retried due to the previous decline that was returned from the issuer
You will have to collect a new payment method from your customer in that situation
Okay so for req_IyByzOW9kvirv8 the PaymentMethod was first used in https://dashboard.stripe.com/logs/req_D1v5UipeFOggxz where the PaymentIntent moves to requires_action
That means 3DS must be completed
Once that occurs and the PaymentIntent moves to succeeded, then the PaymentMethod will be attached to the Customer
And then you can charge it again in the future
a more isolated error for cus_QKbJcqJLp8rYG5 req_4cwV8baKz5ykG9 req_SmKEESCyQGa79E req_tug2prMGn4sIfn req_hHSP3PuKm740Ez
Yep that is all the same scenario I just described
Why are you repeatedly trying to create new PaymentIntents here?
sorry the screen sharing is still loading
but gotcha
I think this is a poor setup where we are:
not giving the customer the chance to authenticate 3ds cards - to be implemented on our end
not canceling the existing payment intent when that happens so they try again
Got it
Yeah I'd recommend making sure your integration handles 3DS
You can use our 3DS test cards (https://docs.stripe.com/testing#regulatory-cards) to test this end-to-end
yeah, this is just a prioritization on our side :/
if we do not support this cards yet, the best thing to do is to just cancel that payment request correct?
I'd recommend using error_on_requires_action (https://docs.stripe.com/api/payment_intents/create#create_payment_intent-error_on_requires_action) if you aren't going to support 3DS
That will save you an API request to cancel the PaymentIntent and you can figure out how you want to restart the flow (ask for a different PaymentMethod) from there
oh that's amazing, exactly what it is needed!
until we support it!!
thank you so much for your help!
One more question not directly related to this issue
Sure
in the past, we used to take one extra step and attach the payment method to the customer as their default payment method.
With payment intent we don't do that anymore, we don't take an extra step to set the it as default. We just let the payment intent to set that automatically, and that goes to a customer sources, but not default.
Is there any advantage in setting the default payment method to the customer?
"default payment method" doesn't really exist with PaymentIntents -- you would only use a default if you were working with Invoices/Subscriptions
This is different from the legacy Charges API as you noted
But yeah, setting a "default" has no affect when creating PaymentIntents -- you always have to pass in the PaymentMethod ID that you want to charge
sounds good, I think that's all! I appreciate your time