valrecx
valrecx

Reputation: 469

XERO API, Update payment amount

I need to create note for an invoice on XERO using XERO API, however, it seems that this functionality is not yet available. So my next solution is to set the amount of a payment into $0.00. My problem is that xero api returns a validation error but no additional detail.

if (payment != null && payment.Status != PaymentStatus.Deleted)
 {
     api.Payments.Update(new Payment { Id = payment.Id, Amount =  0 });
 }

It seems that only payment that you want to delete is being updated.

api.Payments.Update(new Payment { Id = payment.Id, Status = PaymentStatus.Deleted });

any suggestions or advise?

Upvotes: 0

Views: 339

Answers (1)

Adam Moore
Adam Moore

Reputation: 371

Payments in Xero can't be updated. You can only delete them and redo them.

This is true in both the web app and the API.

If you're trying to add a note I'd recommend adding a description--only line item to the invoice

Upvotes: 1

Related Questions