#koja-error
1 messages · Page 1 of 1 (latest)
@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 !
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
but you wouldn't get that error if it was missing
I tried to debug but didn't find null field
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?
yes
so what happens if the PaymentIntent does not have a PaymentMethod? (that's extremeley normal and common). You want some if-statemtents here, like to only look at the PaymentIntent if its status is succeeded https://stripe.com/docs/payments/intents?intent=payment
yes
that might be a rpoblem