#Nemephir

1 messages ยท Page 1 of 1 (latest)

fervent irisBOT
exotic wasp
#

Hi there!

#

Can you share the customer ID (cus_xxx)?

void zealot
#

Of course : cus_NG77fovxBwAwFE

#

Created the January 29th 2023

exotic wasp
#

This customer if not deleted

#

But, 2 months later, when I would use this customer id to create another payment intent, je customer no longer exists.
Can you share a request ID (req_xxx) where you see an error for this customer?

void zealot
exotic wasp
#

But if you search cus_NG77fovxBwAwFE in the dashboard search bar you should be able to find it since it's not deleted (assuming you are logged in the correct account).

fervent irisBOT
void zealot
#

Okay, the problem may not come from the user, but probably from the payment card. (I have one error message for many requests).
The Api cannot found registred card for this customer.
On database, I've saved the card pm_1MVatBDcF2myXw9KRLEmgWrW.
Can you confirm the existance or not of this payment method ?

exotic wasp
#

The Api cannot found registred card for this customer.
Can you share the exact request ID where you get an error?

void zealot
#

req_nTpL1Ddk5en8OF

languid gorge
#

Hey! Taking over for my colleague. Let me catch up.

languid gorge
#

we need the request that return the error you are facing

void zealot
#

The problem arrived for 80% percent of payments.

languid gorge
#

Because that payment method isn't attached to a customer

#

how are you creating it ?

azure latch
#

/lock

azure latch
#

@void zealot can you summarise the issue/give an example?

#

try now

void zealot
#

yes, thanks

#

On development, I have the customer cus_NjHA6KNNLesCnQ with payment pm_1MxocQDcF2myXw9KBvm7owCw

On production, the customer cus_NG77fovxBwAwFE was saved the payment method pm_1MVatBDcF2myXw9KRLEmgWrW ; but now, when I call the PM list of this customer (req_nTpL1Ddk5en8OF), API return 0 cards.

azure latch
#

there's nothing in the contents of the API requests you made that seem to show that we were supposed to save that payment method to the customer, maybe something went wrong in your system at the time?

void zealot
#

I try to understand

fervent irisBOT
void zealot
visual delta
#

In the payment intent create code

#

That will tell stripe to save the payment method that is used to pay that payment intent

void zealot
#

Thank for the specification.
setup_future_usage is alreay availabled.

visual delta
#

The 4242 card that is saved to that customer is the one that you used to pay pi_3Mxqw1DcF2myXw9K3CkvWo6Y

void zealot
visual delta
#

If you use setup_future_usage in production, it will save these cards. If that has not been happening then your code does not use this parameter in production. If you have another customer that you think used setup_future_usage but didn't save a card, send me their ID and I can look further.

void zealot
#

I check for most recent users

void zealot
visual delta
#

Thanks for the IDs. I am looking in to them and will tell you what I find

#

So it looks like those payment methods were created by these two payment intents: pi_3MxZMFDcF2myXw9K2Nc6IEdd and pi_3MxqxZDcF2myXw9K3Uhxh0f1

#

And both of them have setup_future_usage set

#

But you didn't set the customer field, so those payments are not associated with those customers

#

If you provide customer and setup_future_usage then these cards will be saved

void zealot
visual delta
#
void zealot
#

Ah !

#

I think I know what the problem is.

#

When you receive a null value, it will be removed on log ?

#

When I receive the customer id, I save it on database, and after that, I read it on the database. But this database have a cache. This created problems for me many years ago.

rugged saffron
void zealot
#

Alright ! Thanks for the confirmation.

#

It's all to me. I haven't another question.

#

Really thank to you 5 ๐Ÿ™‚

#

The thread can be closed.