Adding payment method when creating account via api


In the API, what is the best way to add a payment method to an account you are creating via the API?


There isn’t a best way, the available options are at


I’m aware of the the method but where I’m stumped is in providing an account ID to create payment for an account that isn’t yet created?!

When a new customer fills out a form to create their account (, how would they add their CC to their account without having the account ID?


You can’t. There needs to be an account. It’d be two API requests.


How would the page know what the newly created account’s ID is?


You’d get it from the API response when you create an account. The response JSON contains the account ID.


Awesome. Thanks!