#Dan The Man ๐จ๐ฆ
1 messages ยท Page 1 of 1 (latest)
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.
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
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.
oh got it, and I assume I should be calling this API to retrieve the payment method id/details, correct? https://stripe.com/docs/api/payment_methods/customer_list
Yep!
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!
Happy to help!