#uhoh-error
1 messages · Page 1 of 1 (latest)
Can you log exactly what you are sending in that call? Because the error makes it look like you aren't sending what you think you are at least
amount,
currency: 'cad',
customerId,
payment_method: paymentMethodId,
confirm: true,
};```
and stripeAccount is the accountId
sure but right now it's all abstract/theoretical. Please log exactly what you are passing and share the exact output of that
amount: 500,
currency: 'cad',
customer: 'cus_MIaKvObCIOrAyc',
payment_method: 'pm_1LZzA6IAShFZhsKWzoiy38KP',
confirm: true,
}```
"error":{"message":{"message":"Stripe: Unknown arguments ([object Object]). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to POST `/payment_intents`)"
That's still far from what I asked 😅
what is in the second parameter exactly?
Can you give me exact end to end code to reproduce your exact issue?
const { stripe_account: stripeAccount } = await getStripeAccount(['stripe_account]); // this returns an connect account id, or null if none is found
const paymentIntentDetails = {
amount: 500,
currency: 'cad',
customer: 'cus_MIaKvObCIOrAyc',
payment_method: 'pm_1LZzA6IAShFZhsKWzoiy38KP',
confirm: true,
}
paymentIntent = await stripe.paymentIntents.create(
paymentIntentDetails,
stripeAccount ? { stripeAccount } : {},
);
I'm not sure what else to provide
Take a step back from your error, and try to write a clear code that I can simply copy-paste to reproduce your problem
(node:54150) UnhandledPromiseRejectionWarning: ReferenceError: getStripeAccount is not defined
at /Users/remi/Workspace/stripe-node-examples/reproduce_error.js:4:45
at Object.<anonymous> (/Users/remi/Workspace/stripe-node```
Like what exactly is that function, can you share that?
const paymentIntentDetails = {
amount: 500,
currency: 'cad',
customer: 'cus_MIaKvObCIOrAyc',
payment_method: 'pm_1LZzA6IAShFZhsKWzoiy38KP',
confirm: true,
}
paymentIntent = await stripe.paymentIntents.create(
paymentIntentDetails,
stripeAccount ? { stripeAccount } : {},
);```
Here
thanks! trying
paymentIntentDetails,
{},
);``` okay so really your question boils down to "why does this error" right?