#Bruno777
1 messages · Page 1 of 1 (latest)
Are you using Stripe Checkout for client-side?
You can supply a Customer into the Checkout, and we will display previous used cards of that Customer
I developed in custom and I use \Stripe\Customer::create
then PaymentIntent::update but apparently I can't retake this customer if I don't specify this authorization on the PHP side during the 1st payment
I understand you use PaymentIntent, but more important is what you use in client-side to accept payment?
On the client side, I go through JS for the 1st payment with a token (PI_ID)
Hi @naive radish I'm taking over this thread
Ok thanks
Is your question about performing a off_session charge? (e.g., save a previously used card payment method so that you can charge the customer again without asking them to input the card details?)
I store the cus_*** but apparently I can't trigger other payments with this cus_.
It seems that I have to specify that I have this authorization on the PHP side during the 1st payment to be able to do it, but I can't find which argument I have to modify on my PaymentIntent?
yes, that's exactly what I'm looking to do.
Got it, so you can set setup_future_usage to off_session (https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage) when creating a PaymentIntent, this tells Stripe to attach the payment method to the customer after the payment is succeeded.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks
So that you can pass the customer, payment_method, and set off_session to true when you create the subsequent off_session paymentIntents
You can find details on this page https://stripe.com/docs/payments/save-and-reuse?platform=web#charge-saved-payment-method
Can you confirm that on my side, I only have to keep the cus_id reference?
I don't need to store the PI_ID?
In other words, if all my payments are made by credit card, at this stage, I will just have to specify: 'payment_method' => 'card'
during the PaymentIntent following the 1st payment.
No, you don't need to store the PI_ID, but you need to specify the payment method ID, which starts with pm_
Ok thank you