Via the REST API it is possible to enter the same payment number twice. If you then try to update your payment in the UI, you will get an error 422 because the number already exists. Trying to create a payment via REST with a number that has already been given, should result in an error.
fix checked in for this.
It is possible to create payments with amount = 0. This doesn’t really make sense.
Some scenarios require this.
If a payment can not be made through the API because of an error, it results most of the time in a 302 error (redirect) which doesn’t help finding the error. For example if you try to apply a payment to an invoice that is already fully paid.
I'll need to look into this.
Whether an email is sent or not is decided by the query string email_receipt. The standard payload in the body does have a key called sendEmail and this can be set to true or false. But in both cases, email notifications will be sent. Why is this done by a query string instead of the key in the body?
Where are you seeing the references for send_email and email_receipt?
Which route can be used to get the payment type IDs? /api/v1/company_gateways only results in a list of payment provider set up by the user. I am looking for the list like the table above.
We bundle all of these in our /statics route - or - you can inspect the payment_types table of the db
It would be nice if you could apply a payment to a client or an invoice using the client number or invoice number instead of their ID. In most cases, the ID is not known by an external programm and thus needs an additional lookup like /api/v1/invoices?number=12345 to recive the ID.
We can look into this, we should be able to support payments by invoice number
What search parameters can be used in the API. I already found out that I can user number to search for an invoice number but I guess there must be more. I couldn’t find anything in the documentation.
We are still working on the docs for the developer API, I have done a spec on the Clients route here:
Adding search filters are trivial in V5, in the repository you can see in app/Filters the full set of filters that are currently in place for all entities, if you have a specific one you need, just advise and we can add this in. I've added in filtering by payment numbers.