Payments and credit notes
Lesson 7 of 12 7 min read
Decide whether Supply Lens records payments against invoices, which bank account they land in, and how credit notes and refunds are created.
Some orders are paid before they're invoiced: a card payment on a storefront, or a marketplace that pays you directly. If Supply Lens creates the invoice in Xero but not the payment, finance has to reconcile every one by hand. In this lesson you'll decide when Supply Lens should record the payment too, and how credit notes and refunds are handled.
Should Supply Lens record a payment?
| generatePaymentForInvoice | On: a Xero payment is created as soon as the invoice is created, so the invoice is recorded as paid straight away. Choose on when every order through this flow is already paid. |
|---|---|
| generatePaymentForInvoiceMap | Maps tags to on or off, so some orders get a payment and others don't. Use it when one Integration carries both prepaid orders (say, card) and account customers on terms. |
| setPaymentAmountToCreatedInvoiceTotal | On: the payment is for the invoice total as Xero created it, rather than the amount in the source. Choose on to avoid tiny part-paid balances when Xero's rounding or tax calculation differs by a penny from the source. |
Which bank account does the payment go to?
| bankAccountTagMap | Maps tags to a Xero bank account. The first matching tag decides the account. Use it to send each payment provider or channel to its own bank or clearing account. |
|---|
Clearing accounts
Many finance teams record payments into a clearing account per payment provider, then match the
provider's payout against it. Talk to your accountant about whether that suits you before you
choose bank accounts in bankAccountTagMap.
Remember the invoice status
The invoice status for paid invoices is set by statusPaid, which defaults to DRAFT. Agree
with finance what status a paid invoice should have, alongside switching on payments.
How are credit notes created?
The Xero Credit configuration turns credit Documents into Xero credit notes. Its line settings
work exactly as they do on invoices: lineAccountCodeMap, shippingLineAccountCode, the two
adjustment account codes, createLinesAsDescriptionsOnly with descriptionLineAccountCode,
setTaxTypeOnLineItems, excludeTaxOnLines and its map, and lineTrackingCategories. Use the
same account codes as your invoices unless finance wants returns reported separately.
| status | The status the credit note is created in, for example DRAFT or AUTHORISED. Choose DRAFT if finance approves every credit. |
|---|---|
| generatePaymentForCreditNote | On: a payment (in effect, a refund) is recorded when the credit note is created. Choose on when the refund has already gone back to the customer's card. |
| setPaymentAmountToCreatedCreditTotal | On: the refund payment equals the credit note total as Xero created it. |
| bankAccountTagMap | Maps tags to the bank account the refund payment comes from. |
Hilltop Coffee adds retail
After wholesale has run smoothly for a month, Hilltop adds retail orders to Xero. Retail orders
are paid by card and arrive tagged retail; wholesale cafés pay on 30-day terms. The implementer
sets generatePaymentForInvoiceMap so retail gets a payment and nothing else does,
bankAccountTagMap so retail payments land in the card clearing account, and turns on
setPaymentAmountToCreatedInvoiceTotal. For returns, the Xero Credit configuration creates
credit notes as DRAFT with no automatic refund, because the customer service team decides
refunds case by case.
Recap
- Turn on payments only for orders that are genuinely paid; use the tag map when the flow mixes prepaid and on-account orders.
setPaymentAmountToCreatedInvoiceTotalkeeps payment and invoice exactly equal.bankAccountTagMapchooses the bank account by tag; the first match wins.- Credit notes share the invoice line settings and add their own status and refund options.
Quick guides for this topic
Your progress is saved in this browser. Create a free account to keep it everywhere, take quizzes and earn certificates.