I can create subscriptions, but I can't figure out how to update a subscription so that it uses a new credit card.
This is what I've tried: (assuming there is already an existing client, payment and subscription)
- create token in ui
- create a payment object in server
update client like this:
paymill.clients.update(clientId, { payment: payment.id }, callback);
I get this error:
Error: Identifier,payment
Exception: Api_Exception_InvalidParameter
Which calls do I need to make to achieve this?