#qasimkhan.
1 messages ยท Page 1 of 1 (latest)
Hi ๐ can you elaborate on what you mean when you say you need to save the customer's card? Our current guide for building a two-step confirmation process includes a step that creates a Payment Method from the details the customer provides, are you looking to do something beyond that?
I mean to save a customer's card for future use. Ideally when the customer is shown the Payment Element, the customer should be to able to choose if he wants the site to save the card for future transactions. If he selects this option, then the payment gateway saves the provided card info against the customer ID at their end and displays the card info when the user next visits the billing page in the future. I hope it makes sense.
Gotcha, that does make sense, but there currently is not prebuilt functionality for that behavior. If that is something you would like to offer to your customers, then it will need to be custom built.
Strange to hear that stripe does not offer the saved card functionality in its elements.
I cannot save the card on my end due to PCI compliance. This is why the payment gateways usually provide such features with online payments
Reference
You can setup the payment for future usage, we just don't have the prebuilt checkbox for doing that yet. Currently you would need to add your own checkbox, and have that adjust your flow accordingly. Since you're processing a payment at the same time, you would leverage the setup_future_usage field on the Payment Intent:
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage
and be sure to associate a Customer with the Payment Intent:
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-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.