#ganeshgawali_04977

1 messages · Page 1 of 1 (latest)

frank oliveBOT
#

Hello! We'll be with you shortly. 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.

frank comet
#

Here is the 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.

#

The payment method was created for this customer cus_PdInGLfyJ7e3Wj

#

it seems that you've detached the payment from that customer

#

That's why.

#

If you want to reuse the payment method, you need to attach it to the same customer again or not detaching it.

edgy crow
#

basically I am creating new customer everytime

frank comet
#

Why ?

edgy crow
#

Can you please check this code and tell me what is wrong with it

frank comet
#

You need to reuse the existing customer if there is any

#

No we don't provide code review in this channel

edgy crow
#

okay

frank comet
#

But the issue with your request is that you detached the payment method

#

from the customer

#

and tried to reuse it in another payment intent

#

you ned to make sure to not detach the payment method from the customer if you are willing to use it again.

edgy crow
#

okay