#karam-customer-paymentmethods
1 messages · Page 1 of 1 (latest)
Hi 👋
Can you share the request ID for the API request that returns this error?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_6kzalInhwOCKb0
sorry i was wrong this is the right one: req_Xtswi8M94y2sds
the request is 200 status code but i get 404 in my code for some reason
Sorry I don't know what that means. What in your code is triggering a 404?
yeah in my console
cus_O9aBHDlzFIdBv3 is the customer's id that the cloud function is recieving
this is the print statement print('Error retrieving card details: $error')
So the customer does not exist in your system?
Okay but you are saying your code isn't returning what you expect. I can only really help with the Stripe API portion of things so I'm just throwing out ideas about the rest
A 404 implies your cloud function cannot find something it is looking for
Yes. But not Flutter
Looking at your code you are creating a 200 and a 500 response. It's not clear to me what function is triggering the 404
I don't know what you mean here
Some code somewhere is returning a 404
If it isn't the code you shared already, where is it?
i have no idea it's no where i have never written 404 anywhere
but when i print the whole thing instead of the status code i get this...
Okay so the service you are sending an API request to from your code is returning a 404 I think
But that isn't Stripe related code so I can't really offer any advice on it
Okay
i am using the shell again but nothing is gettings added to the logs
last thing in the logs is 30 minuites ago
i am refreshing the page and nothing new is popping up
however when i make a payment in my app it does get printed in the log
but when i try to retrieve data nothing gets printed in the logs even when i use the shell
WE don't log GET requests by default
ooh okay thank you
You CAN check it by going to the Dashboard and adjusting the filters on the Log page
If you click on the Method drop down you can check the GET requests. But we don't store the payloads so you won't see what we returned
okay i appreciate it man
i have fixed the problem you are right it's from my end
can i ask you for a favour
do you know what this error could mean? {error: Cannot read properties of undefined (reading 'list_payment_methods')}
this is how my code looks like now
i don'y know javascript very well unfortunately
What line is throwing the error?
i do now get the value returned back to my flutter code but i get that error as a return
I'm sorry but that still doesn't make any sense to me. So you are saying the content of response.body is returning an error, not a list of payment methods?