#Daniel M. - backend error

1 messages · Page 1 of 1 (latest)

strange ice
#

Hello, happy to help figure this out. Can you send me the code you are using for this call and the exact error message?

storm dirge
#

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

strange ice
#

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?

storm dirge
#

oh you mean the amount might be too low?

strange ice
#

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

storm dirge
#

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!

strange ice
#

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

storm dirge