0
const stripe = require('stripe')(secret_key);

const paymentIntent = await stripe.paymentIntents.create({
  customer: customer_id,
  amount: 2000,
  currency: 'usd',
  automatic_payment_methods: {enabled: true},
});

If I create a PaymentIntent like the above via Node, will it check for whether or not the customer actually has the resources to fulfill this payment amount?

1 Answers1

1

No. PaymentIntent will need to be confirmed (passing confirm: true) to actually attempt to charge this customer_id.

Note that you shouldn't share your secret key, even a Test mode one, in a public space like this.

orakaro
  • 1,468
  • 1
  • 9
  • 9