#maskirovka00
1 messages · Page 1 of 1 (latest)
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
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})```
The error implies that whatever user is, the stripeUserId field is unset
yeah but if I log it I get the correct ID
stripeUserId : "cus_OPsB59D2NPk84n"
doing it manually through insomnia/postaman it works
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
I tried but same error
Error: Stripe: Argument "customer" must be a string, but got: undefined (on API request to GET /v1/customers/{customer})
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
isn't that a request stripe does to get the customer ID?
let me check
You're giving us the cus_xxx ID
actually yeah I found the issue, I was making a second request later on the code
but gave the wrong id
🙂