API - List payment methods

Question asked by Lunar Farside 8 years ago

Hi, we are trying to create payments using the API. The documentation says the 'paymentMethod' field is optional however but we are getting errors when we don't set it. Furthermore we couldn't find any method to access the ids of the payment methods, so that we would know what to put in the 'paymentMethod' field. Can you help us with this, thanks.

2 Replies

Hi Lunar,

Sorry for the delay - our development team have updated with the following:

I took a look and our API indeed makes the paymentMethod field mandatory. So the documentation is wrong, I just updated that api doc page to be a bit more accurate. It looks like this is not a recent change, that's how it always was ever since 2009. I'm not 100% sure if this should be indeed mandatory or not, but I think we shouldn't change it. As for getting a list of valid payment method values, they need to log in to the account which they want to use the API with, and go to Money > Payment methods. These are the valid payment methods, but the API requires their IDs and not the names. To figure out the IDs, they can check the delete links in the last column. Each of those URLs have a payment_id parameter, and the API requires one of those IDs.

Hi Lunar,

I have escalated to the development team to provide and answer.

Reply to this question

Attach images by dragging and dropping or upload
 

Your comments will be public and can be answered by anyone in the Clear Books community.

Find out what we do and who we are