Build e-Arşiv Fatura (UBL-TR) Invoice XML
Skill: Convert a B2C / unregistered-recipient invoice into the e-Arşiv Fatura XML reported to GİB
Region: Türkiye (Turkey)
Category: E-Invoicing — e-Arşiv Fatura
Does: Takes invoice data for a recipient who is not a registered e-Fatura user (B2C consumers, or businesses outside the e-Fatura system) and produces the e-Arşiv Fatura XML, built on the UBL-TR 1.2 customization with the EARSIVFATURA profile, delivered to the buyer (paper or electronic) and reported to GİB in the daily e-Arşiv report.
Standard: UBL-TR 1.2 (e-Arşiv profile of OASIS UBL 2.1)
e-Arşiv Fatura is the format for invoices to recipients outside the e-Fatura registry. Unlike e-Fatura, the document is not routed through GİB to the buyer; instead the issuer sends it directly (electronic or printed) and reports all e-Arşiv invoices to GİB — registered e-Arşiv users / özel entegratör report daily (by the end of the next day). The document is signed with Mali Mühür / e-imza. Sales to consumers above the published threshold and all internet sales must be issued as e-Arşiv. Validate against the current UBL-TR schema before issuing.
When this applies
- The recipient is a B2C consumer or a business not registered in the GİB e-Fatura system.
- The issuer is a registered e-Arşiv user (taxpayers within the e-Fatura system must issue e-Arşiv for non-e-Fatura recipients; internet sales and B2C above the annual threshold are mandatory).
- For recipients who are registered e-Fatura users, use the e-Fatura skill instead.
Input data required
| Input | UBL-TR / UBL element |
|---|---|
| ETTN (invoice UUID) | cbc:UUID |
| Invoice number (16 chars: prefix + year + sequence) | cbc:ID |
| Issue date / time | cbc:IssueDate, cbc:IssueTime |
| Invoice type (SATIS, IADE) | cbc:InvoiceTypeCode |
| Profile | cbc:ProfileID = EARSIVFATURA |
| Delivery channel (ELEKTRONIK / KAGIT) | report metadata |
| Internet sales flag + extra fields (web address, payment, dispatch) | cac:AdditionalDocumentReference / report |
| Seller name, address, VKN, vergi dairesi | cac:AccountingSupplierParty |
| Buyer name/address, TCKN (or VKN), or NONE for unidentified consumer | cac:AccountingCustomerParty |
| Line items, KDV rate | cac:InvoiceLine |
For an unidentified consumer the buyer TCKN may be recorded as 11111111111 per GİB convention; named consumers carry their real TCKN (11 digits).
Document structure (UBL-TR 1.2, e-Arşiv profile)
Invoice
├── cbc:CustomizationID (TR1.2)
├── cbc:ProfileID (EARSIVFATURA)
├── cbc:ID (16-char invoice number)
├── cbc:UUID (ETTN)
├── cbc:IssueDate / cbc:IssueTime
├── cbc:InvoiceTypeCode (SATIS | IADE)
├── cbc:DocumentCurrencyCode (TRY)
├── cac:AccountingSupplierParty (satıcı — VKN, vergi dairesi)
├── cac:AccountingCustomerParty (alıcı — TCKN/VKN; consumer)
├── cac:TaxTotal (KDV per rate, TaxTypeCode 0015)
├── cac:LegalMonetaryTotal
└── cac:InvoiceLine ...
The same UBL-TR Invoice schema as e-Fatura is used; the differentiators are ProfileID = EARSIVFATURA, the delivery channel (ELEKTRONIK / KAGIT), internet-sale fields when applicable, and the obligation to include the document in the daily GİB report rather than route it through GİB to the buyer.
Calculation rules
- Line amount = quantity × unit price − line discounts (2 decimals).
- Group by KDV rate → per-rate
cac:TaxSubtotal(TaxableAmount,TaxAmount = base × rate). TaxInclusiveAmount= tax-exclusive total + total KDV;PayableAmount= tax-inclusive − allowances + charges.- KDV: standard 20%, reduced 10% and 1%.
- For internet sales, record carrier/dispatch and payment details; these flow into the e-Arşiv report.
Worked example (EARSIVFATURA, B2C consumer, one line)
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:UBLVersionID>2.1</cbc:UBLVersionID>
<cbc:CustomizationID>TR1.2</cbc:CustomizationID>
<cbc:ProfileID>EARSIVFATURA</cbc:ProfileID>
<cbc:ID>EAR2026000000045</cbc:ID>
<cbc:UUID>3f2504e0-4f89-41d3-9a0c-0305e82c3301</cbc:UUID>
<cbc:IssueDate>2026-06-04</cbc:IssueDate>
<cbc:IssueTime>14:32:00</cbc:IssueTime>
<cbc:InvoiceTypeCode>SATIS</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>TRY</cbc:DocumentCurrencyCode>
<cac:AccountingSupplierParty>
<cac:Party>
<cac:PartyIdentification><cbc:ID schemeID="VKN">1234567890</cbc:ID></cac:PartyIdentification>
<cac:PartyName><cbc:Name>Örnek Mağazacılık A.Ş.</cbc:Name></cac:PartyName>
<cac:PostalAddress><cbc:CitySubdivisionName>Konak</cbc:CitySubdivisionName><cbc:CityName>İzmir</cbc:CityName><cac:Country><cbc:Name>Türkiye</cbc:Name></cac:Country></cac:PostalAddress>
<cac:PartyTaxScheme><cac:TaxScheme><cbc:Name>Alsancak</cbc:Name></cac:TaxScheme></cac:PartyTaxScheme>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cac:PartyIdentification><cbc:ID schemeID="TCKN">12345678901</cbc:ID></cac:PartyIdentification>
<cac:PartyName><cbc:Name>Ayşe Yılmaz</cbc:Name></cac:PartyName>
<cac:PostalAddress><cbc:CitySubdivisionName>Bornova</cbc:CitySubdivisionName><cbc:CityName>İzmir</cbc:CityName><cac:Country><cbc:Name>Türkiye</cbc:Name></cac:Country></cac:PostalAddress>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="TRY">120.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="TRY">1200.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="TRY">120.00</cbc:TaxAmount>
<cbc:Percent>10</cbc:Percent>
<cac:TaxCategory><cac:TaxScheme><cbc:Name>KDV</cbc:Name><cbc:TaxTypeCode>0015</cbc:TaxTypeCode></cac:TaxScheme></cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="TRY">1200.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="TRY">1200.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="TRY">1320.00</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="TRY">1320.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">2</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="TRY">1200.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="TRY">120.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="TRY">1200.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="TRY">120.00</cbc:TaxAmount>
<cbc:Percent>10</cbc:Percent>
<cac:TaxCategory><cac:TaxScheme><cbc:Name>KDV</cbc:Name><cbc:TaxTypeCode>0015</cbc:TaxTypeCode></cac:TaxScheme></cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:Item><cbc:Name>Tekstil ürünü</cbc:Name></cac:Item>
<cac:Price><cbc:PriceAmount currencyID="TRY">600.00</cbc:PriceAmount></cac:Price>
</cac:InvoiceLine>
</Invoice>
Sign with Mali Mühür / e-imza, deliver to the buyer (ELEKTRONIK or KAGIT), and include the invoice in the daily e-Arşiv report sent to GİB.
Validation checklist
- Recipient is not a registered e-Fatura user (otherwise issue e-Fatura)
-
CustomizationID=TR1.2;ProfileID=EARSIVFATURA -
cbc:UUIDis a valid ETTN;cbc:IDis the 16-char number - Buyer TCKN/VKN with correct
schemeID(or the GİB unidentified-consumer convention) - Delivery channel recorded (ELEKTRONIK / KAGIT); internet-sale fields present for online sales
- Per-rate KDV subtotals reconcile (20% / 10% / 1%);
TaxTypeCode0015 -
TaxInclusiveAmount= tax-exclusive + KDV;PayableAmountcorrect - Document signed (Mali Mühür / e-imza) and included in the daily GİB e-Arşiv report
Last updated: 2026-06-04 — confirm the active schema version, field codes, and GİB requirements against the current Gelir İdaresi Başkanlığı (Revenue Administration) specifications before use.