#koja-error

1 messages · Page 1 of 1 (latest)

marble cave
#

@old marsh as the error says, usually this means you pass a null variable. Like you do stripe.paymentMethods.retrieve(pmID) and the variable pmID is null.
I'd add some logging and/or breakpoints to your application to see exactly what you pass, if it's null, where it comes from, etc !

old marsh
#

Should I provide requestOptions?

#

with account id

marble cave
#

I don't know, maybe! That's a very specific question.

#

you need requestOptions with the account ID if you're retrieving a PaymentMethod that exists on a connected account

old marsh
marble cave
#

but you wouldn't get that error if it was missing

old marsh
#

I tried to debug but didn't find null field

marble cave
#

which line exactly throws the error?

#

but I mean that code is going to fail that way sometimes

#

you are trying to list every single PaymentIntent on every single connected account, and get the PaymentMethod details from them?

old marsh
#

yes

marble cave
old marsh
#

When will paymentMethod be null?

#

if payment isn't done?

marble cave
#

yes

old marsh
#

that might be a rpoblem