#Svenson-charge-source

1 messages · Page 1 of 1 (latest)

vapid wave
molten gate
#

req_Vh2rDHdroiutwz

vapid wave
#

Any particular reason why you're using Charges and Sources? They're deprecated APIs

molten gate
#

my stripe api version is not up to date

#

no other reason

vapid wave
#

Shouldn't matter. Payment Intents and Payment Methods will still be available

molten gate
#

hm, not sure if I understand

#

there are no big changes on charges when comparing my version and latest one

#

right?

#

what would I use if not charges or sources?

molten gate
#

I tried with payment intent also

#

A source must be attached to a customer to be used as a payment_method. - creating payment intent

#

this was the error while trying to create payment intent

#

I am trying to create a payment without creating a customer

#

but seems like customer is required

vernal moth
#

Hi! I'm taking over this thread.

#

You can use PaymentIntent without a customer. For example (in Node.js)

const paymentIntent = await stripe.paymentIntents.create({
  amount: 2000,
  currency: 'eur',
  payment_method: "pm_card_visa",
  confirm: true
});
molten gate
#

thanks

#

can I re-use that payment_method?

vernal moth
#

If you want to reuse a PaymentMethod, then it needs to be attached to a customer object.

molten gate
#

thanks

#

you help a lot