#Svenson-charge-source
1 messages · Page 1 of 1 (latest)
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_Vh2rDHdroiutwz
Any particular reason why you're using Charges and Sources? They're deprecated APIs
Your error:
For certain sources—namely, cards, bank accounts, and attached sources—you must also pass the ID of the associated customer.
https://stripe.com/docs/api/charges/create#create_charge-source
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Shouldn't matter. Payment Intents and Payment Methods will still be available
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?
You'd use Payment Intents: https://stripe.com/docs/payments/payment-intents/migration
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
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
});
If you want to reuse a PaymentMethod, then it needs to be attached to a customer object.