On the Xero UI, there is a way to go to the Payments made for an invoice, and add an attachment. How to do this through an API? If I try to add an attachment to the payment using the Attachments API - https://api.xero.com/api.xro/2.0/Payments/{PaymentID}/Attachments/{Filename} , I get HTTPNotFound.
But, the Payment ID does exist, as I can see it on the Xero UI, and also get the payment details through the Payments API - https://api.xero.com/api.xro/2.0/Payments/{PaymentID}
Edit : I am using the Ruby Net::HTTP for making the API call. It works when posting an attachment to invoices - https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/Attachments/{Filename}
I am aware that their documentation - https://developer.xero.com/documentation/api/attachments - does not mention the Payments endpoint for attachments. However, the UI allows it. So, I am wondering if there is some way to do it through the API.