#Daniel M. - backend error
1 messages · Page 1 of 1 (latest)
Hello, happy to help figure this out. Can you send me the code you are using for this call and the exact error message?
yeah sure! On it
const stripe = require("stripe")(
"key"
);
exports.createNewCashOrder = async (req, res) => {
const intent = await paymentIntent();
res.json({ client_secret: intent.client_secret });
};
const paymentIntent = await stripe.paymentIntents.create({
amount: process.env.AUDIT_PRICE,
currency: "eur",
automatic_payment_methods: {
enabled: true,
},
});
pretty much all I have
one minute for the error message
StripeInvalidRequestError: No valid payment method types for this Payment Intent. Please ensure that you have activated payment methods compatible with your chosen currency in your dashboard
Thank you, checking in to those
Can you try that request again but with a higher price? Like if you do a price of 100 or 1000?
oh you mean the amount might be too low?
I am wondering if wires are getting crossed and that message should actually be about the charge amount being too low
Yeah, we have a distinct other message for that but that immediately jumped out at me when looking at the call
oh my
I just sat an hour trying to figure out why this error message pops up. That was exactly it
Also when I set the payment_method_type to card instead of automatic I did get an error that the amount provided is not compatible with the payment method... Interesting error logging 😄
Thanks a lot, really greatful for such a fast support!
Gotcha, yeah I will have to put in feedback about that. We really like our errors to be informative and I would imagine that this is a pretty common error to run in to
And just to clarify, the amount there is in cents not euros. A 10 euro payment would be amount: 1000
Yeah that´s exactly why I put in 10 in my .env. Cheers!