#Bruno777
1 messages · Page 1 of 1 (latest)
Hi. You can use this endpoint: https://stripe.com/docs/api/payment_methods/list#list_payment_methods-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
OK, thanks. but then, sorry, what should I do?
After this : $stripe->paymentMethods->all([
'customer' => 'cus_...',
'type' => 'card',
]);
What do you mean?
I have to do this next :
try {
\Stripe\PaymentIntent::create([
'amount' => 989,
'currency' => 'eur',
'customer' => 'cus_...',
'payment_method' => '{{PAYMENT_METHOD_ID}}',
'off_session' => true,
'confirm' => true,
]);
So I have to store the PAYMENT_METHOD ID in a variable, I don't see how to do it
Sorry use this endpoint: https://stripe.com/docs/api/payment_methods/customer_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Just iterate through the list and find the payment method id to use
Thanks, I have this:
Fatal error: Uncaught Error: Class 'Stripe\StripeClient' not found