#Linas

1 messages ยท Page 1 of 1 (latest)

undone lindenBOT
barren junco
#

on Stripe admin, i see, that user has "payment Methods".

languid briar
#

Hello ๐Ÿ‘‹
When you say "Stripe admin", what exactly are you referring to?

barren junco
#

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),
]);

languid briar
#

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?

barren junco
#

System was build couple years go. Now trying to add Stripe Checkout to it.

languid briar
barren junco
#

So, at first i should pull all crads from custoemr account and then charge him with defined card as "source_id" ?

#

*cards

languid briar
#

yup

barren junco
#

thanks for tips.

languid briar
#

NP! ๐Ÿ™‚

barren junco
#

hmm.. PaymentMethods and Cards is not the same?

#

I was trying to pull cards, but it gives me empty object.

languid briar
#

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.

barren junco
#

so, solution here os to change into payment intents instead of charge ?

languid briar
#

Yup, that's the easiest way

barren junco
#

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

languid briar
#

these subscriptions are separate from the checkout session that are also saving the PaymentMethods correct?

barren junco
#

subscriptions are also on the upsell (next page).

#

So, we have customer_id, and with it, via Charges API we create subscription.

languid briar
#

huh not sure.. this would really complicate your integration ๐Ÿค”

barren junco
#

ok, i think, with payment intent i was able to build whole process.

#

i just need to find a way, to get charge id of paid intent.

#

ah, found. thanks for tips again ๐Ÿ™‚

languid briar
#

It should be under latest_charge

#

ah nice

#

Glad I could help