API Overpayments & Prepayments
See the latest comments on this below
The API now supports the retrieval and allocation of prepayments and overpayments using the new Prepayments and Overpayments endpoints.
http://developer.xero.com/documentation/api/v2-release-notes/#2.91
Refunds of Prepayments and Overpayments can be created via the Payments endpoint.
Creation of prepayments and overpayments is still done via the BankTransactions endpoint.
-
Aaron Geiser commented
This one is becoming very important to me. I am currently accepting prepayments from my clients and this is the only part of the API that is missing from my current workflow.
I am using WHMCS as a billing engine and synchronizing invoices, payments, and credits via a custom script. I want to be able to flag an invoice as a pre-payment and use the Xero API to automatically apply the invoice payment as such and disregard the actual invoice in WHMCS.
Right now I have to manually void the prepayment invoice and then go in and manually record a prepayment - then reconcile the bank statement against the prepayment. It's pretty cumbersome.
-
Rob commented
Any further progress on this?
Currently all of the invoice generation is done our side, which we then push to Xero. This is because we have dynamic renewal dates added at the bottom of the line items, that Xero did not support when we were first setup.
We would like to be able to download overpayments that are assigned to invoices, so that we can add these to regular payments and show our staff and customers whether an invoice is paid, partly paid or due in full.
I hope there is some movement on this soon as we raised queries back in October '12.
-
Ali commented
I have two scenarios that require this:
1. Customers usually pay me through my bank's cash deposit machines. Since the machine doesn't accept all denominations, they often overpay and receive a refund at the time of delivery.
2. I get multiple orders for the same customer. They make one deposit rather than two. The way I would get that into Xero is to apply the whole amount to the first invoice, and then manually allocate the remainder to the second invoice.
-
M1ke commented
For a skydiving centre: we want to take a deposit on booking, followed by a balance payment when the participant attends the centre. Because skydiving is weather dependent the customer may not jump on first attendance; we only want the invoice approved (and marked as paid) once the customer has carried out their jump.
We originally planned to use pre-payments, then decided to edit lineitem account codes to produce the same effect, but found that cannot be done either. So either add prepayments or let LineItem codes be changed, as in the main interface, through the API.
-
Aaron Geiser commented
This feature seems like it's pretty closely tied to the credit notes request.
Use case #1:
1. Customer needs a refund
2. Create credit memo for customer
3. Create "Credit memo payment" originating from bank accountUse case #2:
1. Customers pay a consulting retainer or prepays for support hours
2. Create credit memo for customer
3. Create invoices for customer as consulting services are rendered
4. "Allocate credit" towards invoices (instead of issuing an invoice payment)Use case #3:
1. Customer overpays an invoice
2. Issue credit memo for the customer
3. Create "Credit memo payment" originating from bank account -
Anonymous commented
It looks like these overpayments contibute to an organisations receivables balance.
As such, they effect the total balance of the debtors ledger.
I'd like to get at the values in the API in order to reflect correct balances.
-
Matthew Steeples commented
Is there any progress on this idea as being implemented through the API?
-
David Husselmann commented
Our situation is that we simply want to be aware that an overpayment was processed against a customer's record. There is currently no export in the API to allow this - I would have imagined something similar to a credit note would be sent to our system.
-
Lech (CarryTheOne) commented
(The XML was removed from my previous post, but I am sure you know what I meant)
-
Lech (CarryTheOne) commented
In the first instance it would be good to have Xero create the overpayment in the way it does via the UI and allow the client to deal with it manually via the UI from this point.
An extra optional field would need to be added to the Payments API: OverpaymentDescription. Or perhaps instead a set of fields to allow for other settings:
<Overpayment>
<Description></Description>
<tracking>
...
</tracking>
</Overpayment>
Having to create the overpayment amount separately would be technically cleaner (not having essentially invoice line fields inside a payment call), but more cumbersome for API users to implement.
Actually, our (CarryTheOne's) need for overpayments is only down to tax rounding errors, which are currently unavoidable because Xero does not currently support one of the three rounding methods (without double checking I believe it is 'by order' rounding as oppose to 'by unit' or 'by line' rounding which are accessible via the LineAmountTypes field). If necessary we will deal with these rounding errors by adding an extra line to the invoice, but a cleaner solution would be appreciated: ideally if Xero could support all rounding methods or even better allow overriding the invoice total (if only by a few cents/pennies) via the API. The latter would allow for peculiarities which e-commerce applications sometime throw up that don't fall into any of the standard methods.
As a final note, keep up the good work! and as I never miss an opportunity to bring this up, please add stock control to Xero! Customers would love you even more.