#Dan The Man ๐Ÿ‡จ๐Ÿ‡ฆ

1 messages ยท Page 1 of 1 (latest)

abstract caveBOT
hollow prism
#

Hello! Yes, you can. The Payment Method set up for future use and attached to the Customer by Checkout can be used to charge the Customer for other amounts.

fallen comet
#

I thought I could do it with this API call:

  const charge = await stripe.paymentIntents.create({
    amount: amount,
    customer: customer,
    currency: "CAD",   
    confirm: true,
    off_session: true,
  });

but I was getting this following error
payment_intent_unexpected_state: You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method and then confirm it again, or confirm it again directly with a payment method.

I thought it would charge the payment method on file

hollow prism
#

You have to specify the Payment Method you want to use using the payment_method parameter.

#

With Payment Intents and Payment Methods there's no concept of a default Payment Method for one-off payments.

fallen comet
hollow prism
#

Yep!

fallen comet
#

Amazing, thanks for entertaining my questions Rubeus! I heard about this discord group from a friend, and it's exactly as he had described it to me... the best!

hollow prism
#

Happy to help!