#karam-customer-paymentmethods

1 messages · Page 1 of 1 (latest)

lethal gardenBOT
tardy stump
lethal trail
#

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

tardy stump
#

Sorry I don't know what that means. What in your code is triggering a 404?

lethal trail
#

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')

tardy stump
#

So the customer does not exist in your system?

lethal trail
#

it does exists

#

i used stripe shell and i get the value that i want

tardy stump
#

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

lethal trail
#

okay you must be right

#

are you familiar with javascript at all?

tardy stump
#

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

lethal trail
#

i don't have 404 anywhere in the code at all

#

have i returned the code correctly?

tardy stump
#

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?

lethal trail
#

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...

tardy stump
#

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

lethal trail
#

okay i appreciate your help anyways

#

actually it could be

#

two seconds

tardy stump
#

Okay

lethal trail
#

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

tardy stump
#

WE don't log GET requests by default

lethal trail
#

ooh okay thank you

tardy stump
#

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

lethal trail
#

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

tardy stump
#

What line is throwing the error?

lethal trail
#

i do now get the value returned back to my flutter code but i get that error as a return

tardy stump
#

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?

lethal gardenBOT