Corpay

Invoice Coding: How AP Assigns GL Codes Without Slowing Approvals

Category:AP Automation, Procure-to-Pay
Updated:2026-10-16
Author:David Luther
hero_invoice-coding

Invoice coding is the step where AP assigns each invoice line a general ledger account, plus any department, location, or project fields the business tracks. It decides where a cost lands in the books, and it goes fastest when the chart of accounts is clean, ownership is clear, and repeat vendors are coded by rule.

Picture a software renewal invoice that arrives on a Monday. AP captures it the same day, then it sits. Nobody is sure whether it belongs to IT or marketing, the person who signed the contract is traveling, and by Thursday the invoice still hasn't reached an approver. The coding question, not the approval itself, held it up. Most coding delays look like this one. They come from unclear rules, not slow people.

Key Takeaways

  • Invoice coding assigns each invoice line a GL account and any required dimensions, such as department or project.

  • GL account numbers follow each company's own chart of accounts. Common numbering ranges are conventions, not rules.

  • PO-backed invoices can inherit their codes from the purchase order, while non-PO invoices need vendor defaults or a budget owner's input.

  • AP should code recurring and PO-backed spend, budget owners should confirm unusual spend, and the controller should own the chart and the rules.

  • Automation can suggest codes and route exceptions, but people still own new vendors and unusual purchases.

What is invoice coding?

Invoice coding is assigning each line of a supplier invoice to the right general ledger account and dimensions so the cost posts correctly. It answers two questions for every line. What kind of cost is this, and which part of the business does it belong to?

Coding sits between capture and approval in the accounts payable process. An invoice can't post until it's coded, and in many companies it can't route for approval either, because the approver depends on the department or cost center. That makes coding one of the quiet bottlenecks in AP. When it's fast, nobody notices it. When it stalls, the whole invoice stalls.

What does a GL code mean?

A GL code is the number and name of an account in your chart of accounts, such as "6100 Software Subscriptions." It tells the general ledger what kind of transaction this is, so the cost rolls up into the right line of the financial statements.

Many companies number accounts by type, so each kind of account, from assets to expenses, gets its own range. That's a common convention, not a rule. Every company designs its own chart of accounts, so a code that means "office supplies" at one business can mean something entirely different at another. Anyone writing coding rules should start from the actual chart, not a generic template.

What dimensions sit alongside the GL account?

Dimensions are the extra fields that say which part of the business a cost belongs to. The GL account says what was bought. The dimensions say who bought it and why. Department and location are the most common. Project, legal entity, and cost center fields show up in many companies too.

Here's how one three-line invoice from a software vendor might be coded. The account numbers and names are illustrative.

Invoice line

GL account

Department

Location

Project

Annual design software licenses

6100 Software Subscriptions

Marketing

Chicago

n/a

Implementation services

1450 Capitalized Software

IT

Chicago

ERP upgrade

Training sessions

6400 Training and Development

IT

Denver

ERP upgrade

One invoice, three accounts, two departments, and a capital item hiding in the middle. That second line is where errors happen, because implementation services on a qualifying project may be capitalized rather than expensed, depending on your accounting policy. Companies with several entities add another layer. The guide to NetSuite multi-subsidiary AP automation covers how entity coding works there.

How do you code an invoice step by step?

To code an invoice, start from the PO or the vendor's default coding, assign an account and dimensions to each line, and route it to the right approver. Most of the speed comes from defaults and PO data doing the work.

Here's how AP should assign GL codes without slowing approvals. Let the purchase order or a vendor default supply the code whenever one exists, so AP only reviews it. Send anything unusual straight to the budget owner with a suggested code, instead of holding the invoice while AP guesses. Lock the rules in the chart of accounts so the same spend codes the same way every time.

A typical coding workflow looks like this:

  1. Capture the invoice and identify the vendor.

  2. Pull the vendor's default GL account and dimensions, if one is set.

  3. Check for a PO. If there is one, inherit the coding from the PO lines.

  4. Assign an account and dimensions to each invoice line that still needs one.

  5. Flag lines that might be capital rather than expense.

  6. Route the coded invoice to the approver tied to that department or cost center.

How should AP set vendor coding defaults?

Vendor defaults do most of the work on non-PO invoices, so they're worth setting carefully. A default is the GL account and dimensions the system applies whenever an invoice arrives from that vendor, unless someone overrides it.

Good defaults follow a few rules:

  • Set them only for vendors whose spend is predictable, such as utilities, rent, or a single-purpose subscription.

  • Leave them blank for vendors that sell many kinds of things, so their invoices go to a person instead of a wrong guess.

  • Include the department and location, not just the GL account.

  • Review them when a vendor's role changes, such as a supplier that starts providing a new service.

  • Log every override, since repeated overrides mean the default is wrong.

A default that's wrong is worse than no default, because it codes the same mistake silently every month. That's why the override log matters. If AP keeps changing the same vendor's code, update the default and fix the history once.

How do PO-backed and non-PO invoices differ?

PO-backed invoices inherit their coding from the purchase order, so AP mainly confirms it. Non-PO invoices have no order to borrow from, so they depend on vendor defaults or on the budget owner supplying the code.

That difference explains why companies with strong PO coverage code faster. When a requester raises a PO, they choose the account and department up front, and the three-way match carries that coding through to the invoice. Non-PO spend, such as utilities, professional services, or one-off purchases, needs a rule. A utility bill can default to the same account every month. A consulting invoice for a new engagement usually can't, and that's where the budget owner comes in. Corpay's ERP integrations include NetSuite and Sage Intacct, so codes and dimensions set in AP carry straight into the ledger.

Protect cash flow with modern AP

Modernize AP to cut costs, speed approvals, and mitigate payment risk — gaining the real-time visibility to protect cash flow and scale with confidence.

Download the whitepaper
protect-cashflow-with-ap.jpg

When should one invoice be split across codes?

Split an invoice across codes when different lines, or parts of one line, belong to different accounts or departments. Code each line separately, and for a shared cost, split the line by the share each department should carry.

A shared software license used by three departments is the classic case. Rather than coding the whole amount to IT and asking others to reclass later, split it at entry. The allocation method, whether by headcount, usage, or a fixed share, belongs in the accounting policy so AP isn't deciding it invoice by invoice. Once the method is set, a recurring split can become a vendor default too, so the same license codes the same way at every renewal without anyone recalculating it.

Who should own invoice coding, AP or the budget owner?

AP should own coding for recurring and PO-backed invoices, budget owners should confirm or supply codes for new or unusual spend, and the controller should own the chart of accounts and the coding rules. Splitting ownership this way keeps routine invoices moving and puts judgment calls with the people who know the spend.

Invoice type

Who codes

Who confirms

PO-backed

Inherited from the PO

AP checks it during matching

Recurring non-PO, such as rent or utilities

AP, using vendor defaults

No one, unless the amount changes

New vendor or unusual spend

Budget owner supplies the code

AP checks it against the chart

Capital items

Budget owner flags it

Controller or fixed-asset accountant

Chart changes and new rules

Controller

Not applicable

The common mistake is making AP the coder of last resort for everything. AP then spends its time emailing department heads to ask what an invoice was for, and invoices wait in the queue while those emails go unanswered. A better design routes the uncoded invoice directly to the budget owner as part of the invoice approval workflow, so coding and approval happen in one step. For card spend, the same ownership logic applies, and the guide to corporate card spend controls by department shows how it works there.

What do coding errors cost at close?

Coding errors cost time at close and accuracy all month. Every miscoded invoice means a reclass entry, a budget-versus-actual report that tells the wrong story, and sometimes a missed accrual or an audit question.

The cost lands on the close team. Each reclass has to be found, researched and posted, and the department that saw an unexpected charge on its report has to be told it wasn't really theirs. The guide to AP reconciliation covers how those mismatches surface.

Benchmarks show what good looks like on the payment side. According to APQC's Open Standards Benchmarking, the median share of disbursements made first time and error free at 95.0%, across 2,479 companies. The median company also pays 80.0% of supplier invoices on time, across 471 companies. Coding delays push invoices toward the wrong side of that second number.

Catching errors before close is far cheaper than fixing them after. A short weekly review of coded invoices helps, focused on the accounts that get misused most and on any invoice coded to a catch-all account such as "miscellaneous." Department heads who see their spending reports midmonth, rather than only after close, also catch mistakes while the details are fresh. Each correction should feed back into a vendor default or a coding rule, so the same error doesn't show up again next month.

Consistent coding is a control as much as a reporting convenience. COSO's internal control framework, published in 2013, names five components of internal control, and monitoring is one of them. You can't monitor spending you can't see clearly. According to the ACFE's Occupational Fraud 2026 findings, asset misappropriation appears in 90% of occupational fraud cases, and more than half of all cases involved a lack of internal controls or an override of existing ones. Miscoded spend can hide in plain sight, which is why a clear AP audit trail matters.

How does a chart of accounts make coding easier?

A well-designed chart of accounts makes coding easier by giving AP fewer, clearer choices. When two accounts sound alike, people pick different ones for the same spend, and reports drift.

A chart that supports fast coding usually has these traits:

  • Fewer expense accounts, each with a clear purpose.

  • Account descriptions written in plain words, with examples of what belongs there.

  • Required dimensions defined for each account, so nobody skips them.

  • Retired accounts locked, so old codes can't be used by mistake.

  • A named owner for changes, usually the controller.

Can AP automation code invoices on its own?

Not fully. AP automation can suggest GL codes from vendor history and PO lines, and it can route uncoded or out-of-policy invoices to the right person. People still need to own new vendors and unusual spend, including capital decisions.

AI adoption in finance has leveled off rather than surged. Gartner's 2025 AI in Finance Survey of 183 CFOs and senior finance leaders found 59% reported using AI in their finance function in 2025, roughly flat from 58% in 2024. Among those using it, 37% applied it to accounts payable process automation and 34% to error and anomaly detection. And 91% reported low or moderate impact at first.

The potential is larger than today's results. The Hackett Group's AI World Class procurement benchmarks, released in July 2026, model purchase-to-pay process costs falling by as much as four-fifths and staffing requirements by up to 81%. Those are modeled possibilities, not observed results.

For coding, the practical takeaway is to use automation for suggestions and routing, and to keep humans on the judgment calls. A model that learns from your history will repeat your history's mistakes, so a clean chart and good rules come first. The guide to AI in accounts payable covers where AI models help most, and handling the invoices that don't fit is covered in keeping AP exceptions from becoming the rule. Corpay's fully managed AP pairs that coding work with payment by virtual card, ACH, or check from one approval flow.

How Corpay helps AP code and approve invoices faster

Corpay works alongside your ERP, so invoices are coded against your own chart of accounts rather than a separate list that drifts out of sync. Accounts and dimensions sync through 100+ ERP integrations, including NetSuite, Sage Intacct, Microsoft Dynamics 365 Business Central, and Acumatica.

Corpay invoice automation captures invoices and routes them for approval based on the coding, so an invoice reaches the right budget owner without AP chasing it. Invoices with missing or unusual coding go to the person who can resolve them.

Payment follows in the same flow. With Corpay's fully managed AP, approved invoices are paid by virtual card, ACH, or check from one payment file, and Corpay handles supplier enrollment and follow-up. Teams see about 40% time saved on AP processing, and most are live in weeks. Corpay's ERP integrations page lists the supported systems.

Frequently Asked Questions

What is GL coding in accounts payable?

GL coding in accounts payable is assigning each invoice line to a general ledger account, and often to dimensions like department or project. It determines where the cost appears in the financial statements and which budget it counts against. Coding usually happens before approval, because the code decides who approves.

What is an example of a GL code?

An example is "6100 Software Subscriptions," where 6100 is the account number and the name describes the cost. Account numbers vary by company, since each business designs its own chart of accounts. Many use number ranges by account type, but that's a convention, not a requirement.

Who assigns GL codes to invoices?

It depends on the invoice. PO-backed invoices inherit codes from the purchase order. AP codes recurring invoices using vendor defaults. For new or unusual spend, the budget owner should supply or confirm the code, and the controller owns the chart of accounts and coding rules.

How do you fix an invoice coded to the wrong account?

If the invoice hasn't posted, correct the coding before approval. If it has posted, record a reclassification journal entry moving the amount to the right account, with a note explaining why. Then fix the cause, such as a vendor default, so the error doesn't repeat.

Should freight and tax be coded separately?

Often, yes. Many companies code freight to its own account or add it to inventory cost, and sales tax may go to an expense or a tax account depending on whether it's recoverable. Follow your accounting policy, and set vendor rules so freight and tax lines code the same way every time.

Headshot.JPG

David Luther

Product Marketing Program Manager
David Luther, MBA is a product marketing program manager with years of experience in commercial banking, finance, and technology sectors, with research and writing appearing in financial publications.
AP Automation
Procure-to-Pay

Smarter payments. Stronger growth. Keep business moving.

Corpay powers payments for 800,000+ businesses worldwide. Let’s build what’s next for yours.