As you see my question i am confused because i saw many article and stripe documentation solutions for saving card every time i get something different. My application flow is something like that first user come and he will be given 2 options
- previous saved cards
- enter new card
Enter New card
In doing this i take card details from customer and then i am generating token and sending that token and customerId that will be fetched from db(if old customer) and it means that customer is already generated and at backend i create customer first(if no customerId found) using the stripe token i get after adding payment information and then use the customerId i will charge the customer
stripe.charges.create({
amount:amount,
description: '',
currency: 'usd',
customer: customerid
})
Now here my question starts
I cannot use the token i got after adding payment details because that token is only for one time and I cannot use customerId directly to charge the customer then how I can charge the customer in future and how can i get a list of customers saved payment methods and delete or update them.