#juneid_90104
1 messages · Page 1 of 1 (latest)
yes and how can i save them and retrieve them when they are on checkout
for now, what I am doing is creating a setupintent and sending the clientsecret to frontend to attaching the payment methods.
but if the same customer comes to but some other product i want to autofill or show the already attached payment methods
You can 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.
You'd make a call to your backend from the frontend. Backend calls stripe api. Backend processes the data in a way that's friendly to your frontend. Frontend takes that data and you choose how you want to display it
Autofilling isn't possible in the payment element though
You would need to dropdown or other way for them to select the saved payment methods without autofilling
and if they select any of them how will I attach that particular method to the purchase
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
why would i need to create a payment intent
What were you planning to do
i am creating subscriptions
That's how you charge someone
public virtual Subscription Create(SubscriptionCreateOptions options, RequestOptions requestOptions = null)
if i am asking a customer to check the box if they want to use this card for future use
what doe sit mean
and how will i make changes according to this
What box
Lets say
i am using confirmcardsetup method and i want to implement a checkbox which will ask customer if they want to use this card in future
if they say yes they want to use it in future what changes will i have to make
A setupintent already sets up a card for future use
That's the whole point of a setupintent
So as of my understanding when a customer goes to checkout I will get the list of payment methods and ask the customer to select one if they want and then I will pass that specific payment method during the subscription.