AR Overview
Overview
Accounts Receivable (AR) is the money a Business has earned but not yet collected. In Asset, you record it by creating an Invoice for a Customer. Asset keeps the books as the Invoice moves through payment, credit, write-off and refund.
| Object | What it is |
|---|---|
| Customer | Someone the Business sells to. Every Invoice belongs to one. |
| Invoice | An amount a Customer owes, made up of one or more lines. |
| Payment | A bank Transaction, or Customer Credit, applied to an Invoice. |
| Customer Credit | Money the Business owes back to a Customer. It can be applied to future Invoices. |
| Credit Memo | A credit issued to a Customer, which adds to their Customer Credit. |
| Write-off | A balance the Business gives up on collecting. |
| Refund | Money returned to a Customer for an Invoice they paid. |
This guide follows an Invoice from creation to collection. For the step-by-step matching of Transactions to Invoices and Refunds, see Invoice Reconciliation.
Invoices in a currency other than the Business' home currency are covered in a separate guide.
Customers
Create a Customer before you invoice them, using Create a new customer.
| Request Parameter | Description |
|---|---|
| name | Required. The Customer's name. |
| external_id | Optional. Your own identifier for the Customer. You can use it instead of the Asset ID later. |
| Optional. | |
| phone_number | Optional. |
| billing_address | Optional. |
| shipping_address | Optional. |
You can list, update and delete Customers with the other Customer endpoints. A Customer that has been disabled is returned with is_disabled: true.
Create an Invoice
Call Create an Invoice. The body is a list of up to 100 Invoices.
curl --request POST \
--url https://api.sandbox.getasset.com/v0/business/biz_GA6EG2qFxA97NZHtxeLPUy/invoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[
{
"number": "INV-001",
"description": "Roof repair, 14 Elm Street",
"sent_at": "2025-01-15T00:00:00Z",
"due_at": "2025-02-15T00:00:00Z",
"customer_external_id": "customer_8841",
"lines": [
{
"description": "Labor",
"amount": 1200.00,
"ledger_id": "ldg_ErisumsAc7qgmbTctM7zKK"
},
{
"description": "Materials",
"amount": 380.50
}
]
}
]'| Request Parameter | Description |
|---|---|
| number | Required. Must be unique within the Business. |
| description | Required. Shown on the Invoice's Journal Entry. |
| sent_at, due_at | Required. due_at can't be earlier than sent_at. |
| customer_id or customer_external_id | Required. Send exactly one. |
| lines | Required. Each line has a description, an amount and an optional ledger_id. |
| external_id | Optional. Your own identifier. Must be unique within the Business. |
| tags | Optional. Tags to put on the Invoice. |
| metadata | Optional. Free-form data stored with the Invoice. |
Send the X-User-ID header to record who created the Invoice.
Each Invoice is created on its own. The response has a data list with the Invoices that were created and an errors list with the ones that weren't, for example because the number is already in use or the Customer wasn't found. One failure doesn't stop the others.
What Asset books. Asset records the earned revenue as soon as the Invoice is created, dated sent_at:
- Credit the Ledger on each line, which is normally a revenue Ledger.
- Debit Accounts Receivable for the total.
A line with no ledger_id is booked to Uncategorized Inflow and put in the review queue, and Asset then tries to categorize it in the background. A line with a negative amount, such as a discount, is debited to its Ledger and reduces the receivable. Send a ledger_id on each line to skip the review. The Ledger has to belong to the Business. See Chart of Accounts.
Invoice statuses
| Status | Meaning |
|---|---|
| open | Created and not fully settled. This includes Invoices that are partly paid. |
| paid | Payments or credit have covered the full amount. |
| uncollectible | The balance was written off. |
| partially_refunded | Part of what the customer paid was refunded. |
| refunded | All of it was refunded. |
| voided | Cancelled. It no longer affects the books. |
Asset sets every status except voided for you, as payments, write-offs and Refunds come in. Don't set paid, refunded or partially_refunded yourself.
Get Paid
Each payment is applied to an Invoice, shown in its payments list. An Invoice can be paid in several parts. Once the payments add up to the Invoice amount, its status becomes paid.
Automatic matching
When money arrives in a bank account, Asset looks for an Invoice it pays. It only considers open Invoices with no payment yet that were sent on or before the deposit date.
- If the Invoice number appears in the Transaction description, the Invoice is matched. If the description names several Invoices, the deposit is applied to them in order of due date.
- Otherwise, Asset falls back to the amount. If an Invoice has the same amount as the deposit, that one is matched. If several do, the one due soonest is used.
If the deposit is more than the Invoice amount, the extra becomes Customer Credit.
These are the rules for payments Asset posts on its own. Choosing a suggested Invoice yourself, or using the endpoint below, is a manual application.
Apply a payment yourself
Use Apply a Payment to an Invoice when Asset didn't match a deposit, or matched it to the wrong Invoice.
curl --request POST \
--url https://api.sandbox.getasset.com/v0/business/biz_GA6EG2qFxA97NZHtxeLPUy/invoice-payment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"invoice_id": "inv_Lq5AyApd4pdL1VvakpY5aJ",
"transaction_id": "txn_oiL7THC5RDi2PVUbVyyoJ"
}'Send payment_amount as well to apply only part of a Transaction, which lets you split one deposit across several Invoices. You can't apply a payment to a paid or voided Invoice, or apply the same Transaction to the same Invoice twice. Either returns a 409.
Pay with Customer Credit
To settle an Invoice from a Customer's credit instead of a bank Transaction, leave out transaction_id and send the payment_amount. Asset draws on the credit that is available, the oldest first. The amount can't be more than the credit available or the Invoice's unpaid balance.
Undo a payment
Call Remove Invoice Payment with the payment's ID. The Invoice's paid amount goes down and, if it had become paid or uncollectible, it is open again. A bank Transaction goes back to being unmatched, and any credit that was used is returned. Removing a write-off's payment undoes the write-off.
Customer Credit
Customer Credit is money the Business owes a Customer. It is held as a liability, and it comes from three places:
- A payment that is more than the Invoice amount.
- A Credit Memo.
- A Refund given as credit.
Use the Customer Credit Balance Report to see how much each Customer has, and how much of it is still available.
Credit Memos
A Credit Memo issues credit to a Customer directly, for example for a returned item or a goodwill discount. Use Create one or more Credit Memos.
| Request Parameter | Description |
|---|---|
| customer_id | Required. |
| number | Required. Must be unique within the Business. |
| amount | Required. Must be greater than zero. |
| memo | Optional. A note about the credit. |
| issued_at | Optional. Defaults to now. |
| ledger_id | Optional. The Ledger the credit is booked against, for example the revenue account of the original sale. Defaults to Returns & Allowances. |
| is_cash_backed | Optional. Set it when the credit stands for cash the Customer already paid. |
Apply the credit to an Invoice as described in Pay with Customer Credit. You can void a Credit Memo with Void a Credit Memo, but only while none of it has been applied to an Invoice.
Write off an Invoice
When a Customer won't pay, write off what they owe with Write Off an Invoice.
curl --request POST \
--url https://api.sandbox.getasset.com/v0/business/biz_GA6EG2qFxA97NZHtxeLPUy/invoice/inv_Lq5AyApd4pdL1VvakpY5aJ/write-off \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 380.50,
"description": "Customer unreachable"
}'- The Invoice has to be open.
- The
amounthas to be more than zero and no more than the unpaid balance. - Asset books the amount to Bad Debt Expense and applies it to the Invoice as a payment.
- If the write-off covers the whole balance, the status becomes uncollectible. If it covers only part, the Invoice stays open with a smaller balance.
Refund an Invoice
A Refund returns money for an Invoice the Customer has paid. Call Refund an Invoice.
curl --request POST \
--url https://api.sandbox.getasset.com/v0/business/biz_GA6EG2qFxA97NZHtxeLPUy/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 100.00,
"refund_external_id": "refund_1042",
"refunded_at": "2025-03-01T00:00:00Z",
"method": "ach",
"is_return": true,
"memo": "Returned item",
"invoices_to_refund": [
{
"invoice_id": "inv_Lq5AyApd4pdL1VvakpY5aJ",
"invoice_line_id": "inl_GkBo16N66u2teKfFuFMMwf",
"amount": 100.00
}
]
}'| Request Parameter | Description |
|---|---|
| amount | Required. The total Refund. It has to equal the sum of the amounts in invoices_to_refund. |
| refund_external_id | Required. Your own identifier for the Refund. |
| refunded_at | Required. When the Refund was made. |
| method | Required. cash, check, credit_card, ach, credit_balance or other. |
| invoices_to_refund | Required. One entry per Invoice, with invoice_id or invoice_external_id, an amount, and an optional invoice_line_id. |
| is_return | Optional. Set it when the goods came back. |
| memo, processor | Optional. |
| tags | Optional. Tags to put on the Refund. |
Rules
- The Invoice must have at least one payment. To cancel an Invoice nobody has paid, void it instead.
- A Refund can't be more than the Invoice has been paid, less what was already refunded.
- To refund part of an Invoice, send the
invoice_line_id. Without it, the amount has to be the whole Invoice. - A line can't be refunded for more than its amount, counting earlier Refunds.
- You can't refund an Invoice that is already refunded or voided.
Asset sets the Invoice to partially_refunded or refunded for you.
How the money moves
credit_balance: the Refund becomes Customer Credit, and it is completed right away.- Any other method: the Refund is pending. Asset books the amount to Returns & Allowances against Accounts Payable, then looks in the bank Transactions for the payout. You can match it yourself with Apply Transaction to a Refund. When the matched Transactions cover the Refund, it is completed.
Use Remove Refund Payment to undo a match, and DELETE /v0/business/{business_id}/refund/{refund_id} to remove a Refund.
Edit, void or delete an Invoice
Edit. Update an Invoice can change the number, add or remove lines with line_changes, and change the tags. When the lines change, Asset recalculates the total and rebuilds the Journal Entries of the Invoice and its payments. A voided Invoice can't be edited.
{
"line_changes": {
"create_lines": [{ "description": "Permit fee", "amount": 75.0 }],
"delete_lines": ["inl_GkBo16N66u2teKfFuFMMwf"]
}
}Void or delete an Invoice
- Void an Invoice sent by mistake: call Update an Invoice with
"status": "voided". The Invoice stays on record, and its Journal Entry is zeroed. An Invoice with payments can't be voided, so remove the payments first. A voided Invoice can't be reopened. - Delete an Invoice to remove it completely, with its lines and Journal Entries, using Delete an Invoice. Its payment Transactions go back to being unmatched, and any credit used is returned.
See what's owed
- Aged Receivables Report: the open balance of each Customer, grouped by how late it is. An Invoice that isn't due yet is counted in the first group, 0 to 30 days.
- Customer Credit Balance Report: the credit each Customer has.
- List all Invoices: filter by
status,numbers,due_at_startanddue_at_end.
Scopes
| Task | Scope |
|---|---|
| Create, update and delete Customers | customer:create, customer:update, customer:delete |
| List Customers | customer:read |
| Create an Invoice, apply a payment, create a Refund | invoice:create |
| List or retrieve Invoices and Refunds | invoice:read |
| Update or void an Invoice, write one off | invoice:update |
| Delete an Invoice, remove a payment, delete a Refund | invoice:delete |
| Create a Credit Memo | credit_memo:create |
| List or retrieve Credit Memos | credit_memo:read |
| Void a Credit Memo | credit_memo:update |
Questions? Reach out via our Contact form.