I'm using Stripe.js for creating customers,cards and charges everything works like charm but one thing I want to do is add new card to existing customer but I can't proceed further due to an error, below is the example code
var customer = Stripe.Customer.retrieve('cus_xxxxxxxxxx');
customer.Cards.create(card=card_token);
error: Cannot read property 'retrieve' of undefined
Or is there any api which could be helpful to retrieve and create source card directly using ajax call ?