#Linas
1 messages ยท Page 1 of 1 (latest)
on Stripe admin, i see, that user has "payment Methods".
Hello ๐
When you say "Stripe admin", what exactly are you referring to?
in Stripe admin panel.
i'm charging customer with this function:
$charge = $this->stripe->charges->create([
'amount' => $amount * 100,
'currency' => 'usd',
'customer' => $customer_id,
'description' => $productName,
'statement_descriptor_suffix' => substr($productName,0, 20),
]);
I see. Can you share the PaymentIntent ID where you're seeing this error?
Oh
Quick question: why are you using charges API instead of PaymentIntents API? Is there a specific reason?
You typically want something like this
https://stripe.com/docs/payments/save-during-payment?platform=web#charge-saved-payment-method
System was build couple years go. Now trying to add Stripe Checkout to it.
hmm ok, I don't think charges API is equipped to handle PaymentMethods (for legacy charges API, you need a source: 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.
So, at first i should pull all crads from custoemr account and then charge him with defined card as "source_id" ?
*cards
yup
thanks for tips.
NP! ๐
hmm.. PaymentMethods and Cards is not the same?
I was trying to pull cards, but it gives me empty object.
Ah Yeah. Sorry I should've caught that eariler. They're not the same unfortunately and new version of Checkout uses PaymentIntents + PaymentMethods API underneath to charge customers.
so, solution here os to change into payment intents instead of charge ?
Yup, that's the easiest way
Also we have a subscription with a trial. So subscription is working "in old way with charges".
But when trial will finish, will it automatically be charged ?
because subsciptions are also created not via paymentintents
these subscriptions are separate from the checkout session that are also saving the PaymentMethods correct?
subscriptions are also on the upsell (next page).
So, we have customer_id, and with it, via Charges API we create subscription.
huh not sure.. this would really complicate your integration ๐ค