What does order-to-invoice automation mean?
Order-to-invoice automation means every step between an approved order and an invoice that reaches the buyer and lands in your books runs on rules, without anyone retyping data: the order enters your ERP or accounting software, a shipment record follows, the invoice is issued in the right type (e-Invoice or e-Archive in Turkey) and the right scenario, and the buyer's reply and the payment link back to the same record. In many SMEs someone still carries information from a spreadsheet or an email at some point in this chain. This article covers the steps, the two legal deadlines that shape the timing, and the exceptions that most often break the flow. It reflects Turkish tax and commercial law.
The flow has four steps
The sales channel can be a web shop, a dealer portal, a marketplace or a phone order. The core flow stays the same:
- Order record: the order enters one system with one order number. Customer record, product codes, price and tax rate are validated here.
- Delivery or shipment: goods leave the warehouse or the service is completed. If goods are shipped, the waybill (electronic if you are within e-Waybill scope) is issued at this step.
- Invoice: the system checks whether the buyer is a registered e-Invoice user, picks the document type and scenario, and sends the invoice through your private integrator or the Revenue Administration (GİB) portal.
- Response and closing: for a commercial invoice, the buyer's acceptance or rejection, the payment data and the accounting entry attach to the same order number.
Each handover between these steps is an integration point. We covered stock and order sync errors on the marketplace and web shop side in our ERP and e-commerce integration article; here the focus is what happens after the order is approved.
The law puts two clocks on the flow
Deadline to issue: under Article 231/5 of the Tax Procedure Law (VUK), an invoice is issued no later than seven days after the goods are delivered or the service is performed, and an invoice not issued within that period counts as never issued. The same article authorizes the Ministry of Treasury and Finance to shorten the period or to require invoicing at the moment of delivery. For automation this means the list of "delivered but not invoiced" items should be checked daily and raise a warning on day five. A routine that batches invoicing at month end runs into this limit.
Deadline to object: Article 21/2 of the Turkish Commercial Code (TTK) states that a recipient who does not object to the content of an invoice within eight days of receiving it is deemed to have accepted that content. The rejection and cancellation windows in the e-Invoice system rest on these eight days.
Basic or commercial invoice?
The content of an e-Invoice is the same in both scenarios. What differs is its life after sending. According to the Revenue Administration's guide on e-Invoice cancellation and objection notices (in Turkish):
| Topic | Basic invoice | Commercial invoice |
|---|---|---|
| Reply inside the system | None | Buyer can send an acceptance or rejection |
| Withdrawing a wrong invoice | Request in the e-Invoice cancellation portal within 8 days, approved by the other party | Buyer's rejection response within 8 days |
| External objection | Notary, registered letter, telegram or registered e-mail (KEP) within 8 days | Rejection response or the same external routes |
| What automation tracks | Status of the cancellation request | Acceptance, rejection or expiry of the 8 days |
If you choose the commercial scenario, the most commonly skipped part of the automation is catching the rejection. A rejection voids the invoice. Unless the order, shipment and customer account reflect it, an invalid receivable stays on the statement. Our recommendation: write every response from the integrator back to the order as a status ("invoice accepted", "invoice rejected, awaiting correction") and turn a rejection into a task for sales or accounting.
e-Invoice or e-Archive: decide per buyer
As the Revenue Administration's e-Invoice page describes, e-Invoices circulate between registered users of the system. If the buyer is not registered, the invoice is issued as an e-Archive invoice. The automation should make this decision for every invoice by checking the buyer's tax number against the current list of registered users. Marking a customer record as "e-Invoice user" once and leaving it produces the wrong document type when the customer registers later. We summarized which businesses fall under which thresholds in our 2027 e-document article, based on the Revenue Administration's communiqué.
Exceptions break the flow: 7 scenarios
Building the straight path is the easy half. Most projects struggle with the cases below. Write the rule for each before you start.
- Partial shipment: 60 units of a 100-unit order ship today and 40 next week. Does each shipment get its own invoice, or do you invoice when the order completes? The seven-day clock starts with the first delivery.
- Price or quantity correction: if a difference appears after sending, do you issue a return invoice or wait for a rejection? The rule depends on the scenario (table above).
- Returns: the return invoice or expense voucher for goods coming back should be tied to the same record as the stock receipt.
- Foreign currency: which date and which source set the exchange rate must be a fixed rule; agree it in writing with your accountant.
- Withholding and exemptions: invoice type changes for certain goods and services. If tax data is wrong on the product or service card, automation multiplies the error.
- Integrator outage: if sending times out, the system retries. To avoid invoicing the same order twice, send with a key unique to the order. This is called idempotency; as Stripe's API documentation explains, a retry with the same key returns the result of the first request instead of running the operation again. If your integrator has no such mechanism, run the check on your side: does an invoice number already exist for this order?
- Manual handling: some orders will always be prepared by hand (special pricing, project invoicing). An explicit "invoice manually" flag is better than hidden exceptions.
Questions to answer before building
The list below is our suggestion; add to it according to your sector and software.
- In which system is the order born, and is one order number valid across all channels?
- What triggers the invoice: order approval, shipment or delivery proof?
- Which scenario will you use (basic or commercial), and is it agreed in writing with the customer?
- Who receives rejection and cancellation responses, and on which screen?
- Which report shows deliveries at risk of passing seven days?
- How does the integrator's API behave on errors and retries, and is there a test environment?
- How will payment data (transfer, card, cheque) attach to the invoice and the account?
If this is your first build, start with a single sales channel, for example web shop orders only. It gives you time to see exceptions and fix the rules.
Frequently asked questions
Do I need an ERP for order-to-invoice automation?
Not necessarily. Accounting software with e-Invoice integration can be enough at low volume if order and shipment data live in the same place. With multiple warehouses, partial shipments and a dealer channel, an ERP or a custom integration where order and invoice move on the same record needs less manual work.
Can an invoice be issued before shipment?
Article 231/5 of the Tax Procedure Law sets the latest deadline (seven days from delivery). Invoicing before delivery may be subject to separate conditions; confirm the right method for your flow with your accountant. This article is not tax advice.
What happens if the buyer never answers a commercial invoice?
Under Article 21/2 of the Commercial Code, the content of an invoice not objected to within eight days is deemed accepted. In automation terms, mark the invoice as final at the end of day eight.
What if the same order is invoiced twice?
Prevent it first: send each invoice with a unique key tied to the order number and check for an existing invoice before sending. If a duplicate has gone out, follow the rejection response, the cancellation portal or a return invoice depending on the scenario.
If you are planning to automate your order and invoicing flow, see our automation software and accounting software pages, or get in touch.
Sources: Tax Procedure Law No. 213, Art. 231 (Turkish Legislation Information System, in Turkish), Turkish Commercial Code No. 6102, Art. 21 (Turkish Legislation Information System, in Turkish), e-Invoice Cancellation and Objection Notice Guide (Revenue Administration, May 2021, TÜRMOB archive, in Turkish), e-Invoice legislation and guides (GİB eBelge, in Turkish), Idempotent requests (Stripe API Reference)
Cover photo: GB The Green Brand / Unsplash