#maskirovka00

1 messages · Page 1 of 1 (latest)

proper roostBOT
misty girder
summer loom
#

I don't see logs about that request, let me retry

#

I don't see the request because is a secondary request I think

#

I just use the method

#
stripe.paymentIntents.list({customer: user.stripeUserId})```
grizzled bridge
#

The error implies that whatever user is, the stripeUserId field is unset

summer loom
#

yeah but if I log it I get the correct ID

#

stripeUserId : "cus_OPsB59D2NPk84n"

#

doing it manually through insomnia/postaman it works

grizzled bridge
#

There's likely not an actual API request in this instance as there's probably client-side checking in the SDK to ensure you're actually passing a value

#

This is likely some kind of parsing issue with the stripeUserId

#

Try hardcoding it

summer loom
#

I tried but same error

#

Error: Stripe: Argument "customer" must be a string, but got: undefined (on API request to GET /v1/customers/{customer})

grizzled bridge
#

Are we sure it's this line that's throwing the error? The message implies otherwise:
await stripe.paymentIntents.list({customer: user.stripeUserId})

#

That's not a request to /customers/{customer} as the error indicates

summer loom
#

let me check

grizzled bridge
summer loom
#

actually yeah I found the issue, I was making a second request later on the code

#

but gave the wrong id

grizzled bridge
#

🙂