This documentation presents a comprehensive overview of the Universal Business Language (UBL) 2.4 Invoice Schema, specifically tailored for streamlining the electronic exchange of invoice data between Google and e-invoicing vendors. It facilitates the standardized transmission of invoice information, crucial for vendors to process and subsequently submit to government tax authorities' portals.
Invoice request schema elements:
- Invoice header
- Supplier information
- Buyer information
- Delivery information
- Line items
- Total taxes
- Withholding taxes
- Payment terms and means
- Legal monetary total
1. Invoice header
The invoice header contains high-level information about the invoice, including identification numbers, date and time of issue, invoice type, currencies, and exchange rates.
Element | Description | Example |
---|---|---|
cbc:UBLVersionID | UBL Invoice standard being used | 2.4 |
cbc:ID | Invoice Number | GCEMEAD0000000001 |
cbc:UUID | Google Vendor Request ID - the value must be present in the response message for this invoice request | 123e4567-e89b-12d3-a456-426614174000 |
cbc:IssueDate | Date when the invoice was issued | 2023-06-01 |
cbc:IssueTime | Time when the invoice was issued (in US PT timezone) | 08:20:00-08:00 |
cbc:InvoiceTypeCode | Type of the invoice. Supported values: 380 for Invoice | 380 |
cbc:DocumentCurrencyCode | Currency in which the invoice is presented | USD |
cbc:TaxCurrencyCode | Currency for which conversion of TaxAmount is required | EUR |
cac:TaxExchangeRate | ||
└ cbc:SourceCurrencyCode | Source currency for the exchange rate | USD |
└ cbc:TargetCurrencyCode | Target currency for the exchange rate | EUR |
└ cbc:CalculationRate | Exchange rate for tax calculation at 2 decimals precision | 0.84 |
cac:InvoicePeriod | ||
└ cbc:StartDate | Start date of the invoice period | 2023-05-01 |
└ cbc:EndDate | End date of the invoice period | 2023-05-31 |
cbc:Note | Additional notes or comments pertaining to the invoice | This is a sample note for the invoice. |
Example
<Invoice>
<cbc:UBLVersionID>2.4</cbc:UBLVersionID>
<cbc:ID schemeID="Google">GCEMEAD0000000001</cbc:ID>
<cbc:UUID>123e4567-e89b-12d3-a456-426614174000</cbc:UUID>
<cbc:IssueDate>2023-06-01</cbc:IssueDate>
<cbc:IssueTime>08:20:00-08:00</cbc:IssueTime>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:TaxCurrencyCode>EUR</cbc:TaxCurrencyCode>
<cac:TaxExchangeRate>
<cbc:SourceCurrencyCode>USD</cbc:SourceCurrencyCode>
<cbc:TargetCurrencyCode>EUR</cbc:TargetCurrencyCode>
<cbc:CalculationRate>0.84</cbc:CalculationRate>
</cac:TaxExchangeRate>
<cac:InvoicePeriod>
<cbc:StartDate>2023-05-01</cbc:StartDate>
<cbc:EndDate>2023-05-31</cbc:EndDate>
</cac:InvoicePeriod>
<cbc:Note>This is a sample note for the invoice.</cbc:Note>
</Invoice>
2. Supplier information
This section contains details about the seller, including tax ID, name, address, and contact information.
2.1 cac:AccountingSupplierParty/cac:Party
This element represents the seller (Google).
Path | Description | Example |
---|---|---|
cac:PartyTaxScheme | ||
└ cbc:CompanyID | Seller's tax identification number | IE 9999999X |
└ cbc:CompanyID/@schemeID | Tax scheme identifier | VAT |
cac:PartyName | ||
└ cbc:Name | Name of the seller | Google Ireland Limited |
cac:PostalAddress | ||
└ cbc:AddressLine1 | Address line 1 of the seller | Gordon House |
└ cbc:AddressLine2 | Address line 2 of the seller | Barrow Street |
└ cbc:CityName | City of the seller | Dublin |
└ cbc:PostalZone | Postal code of the seller | D04 V4X7 |
└ cac:Country/cbc:IdentificationCode | Country code of the seller | IE |
cac:Contact | ||
└ cac:Contact/cbc:Telephone | Contact telephone of the seller | 545-123-4567 |
└ cac:Contact/cbc:ElectronicMail | Contact email of the seller | invoice@google.com |
Example
<Invoice>
...
<cac:AccountingSupplierParty>
<cac:Party>
<cac:PartyTaxScheme>
<cbc:CompanyID schemeID="VAT">IE 9999999X</cbc:CompanyID>
</cac:PartyTaxScheme>
<cac:PartyName>
<cbc:Name>Google Ireland Limited</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:AddressLine>Gordon House</cbc:AddressLine>
<cbc:AddressLine>Barrow Street</cbc:AddressLine>
<cbc:CityName>Dublin</cbc:CityName>
<cbc:PostalZone>D04 V4X7</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>IE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:Contact>
<cbc:Telephone>545-123-4567</cbc:Telephone>
<cbc:ElectronicMail>invoice@google.com</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
...
</Invoice>
3. Buyer information
This section contains details about the buyer, including tax ID, name, address,
and contact information. In case that both Agency and end buyer information need
to be included, cac:AccountingCustomerParty
will be used to represent Agency
information (primary buyer) and cac:BuyerCustomerParty
will be used for the
end buyer (secondary buyer) information.
3.1 cac:AccountingCustomerParty/cac:Party
This element represents the accounting customer party. In case of Agency, this element will be used to send Agency information.
Path | Description | Example |
---|---|---|
cac:PartyTaxScheme/cbc:CompanyID | Buyer's tax identification number | 0987654321 |
cac:PartyTaxScheme/cbc:CompanyID/@schemeID | Tax scheme identifier, repeatable if several tax IDs are present | TIN, NIP, SIREN, SIRET |
cac:PartyLegalEntity/cbc:CompanyLegalFormCode | Code specifying the legal form of the company (possible values: 1 for Individual, 2 for Organization) | 1 |
cac:PartyLegalEntity/cbc:CompanyLegalForm | A description of the legal form of the company (possible values: "Individual" or "Organization") | Individual |
cac:PartyName | ||
└ cbc:Name | Name of the buyer | Jane's Construction Company |
cac:PostalAddress | ||
└ cbc:AddressLine1 | Address line 1 of the buyer | 456 Market St |
└ cbc:AddressLine2 | Address line 2 of the buyer | Floor 4 |
└ cbc:CityName | City of the buyer | New York |
└ cbc:PostalZone | Postal code of the buyer | 10001 |
└ cac:Country/cbc:IdentificationCode | Country code of the buyer | US |
cac:Contact | ||
└ cbc:Telephone | Contact telephone of the buyer | 987-654-3210 |
└ cbc:ElectronicMail | Contact email of the buyer | j@construction.com |
3.2 cac:BuyerCustomerParty/cac:Party
This element is used only when the cac:AccountingCustomerParty is used for sending Agency information. All sub-elements are identical in these 2 elements.
Example
<Invoice>
...
<cac:AccountingCustomerParty>
<cac:Party>
<cac:PartyTaxScheme>
<cbc:CompanyID schemeID="VAT">0987654321</cbc:CompanyID>
<cbc:CompanyID schemeID="SIREN">123456789</cbc:CompanyID>
<cbc:CompanyID schemeID="SIRET">98765432100015</cbc:CompanyID>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:CompanyLegalFormCode>2</cbc:CompanyLegalFormCode>
<cbc:CompanyLegalForm>Organization</cbc:CompanyLegalForm>
</cac:PartyLegalEntity>
<cac:PartyName>
<cbc:Name>Jane's Construction Company</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:AddressLine>99 pembroke square</cbc:AddressLine>
<cbc:CityName>Dublin</cbc:CityName>
<cbc:PostalZone>D04 P043</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>IE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:Contact>
<cbc:Telephone>0439843234</cbc:Telephone>
<cbc:ElectronicMail>advert@ads.com</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:BuyerCustomerParty>
<cac:Party>
<cac:PartyTaxScheme>
<cbc:CompanyID schemeID="VAT">0987654321</cbc:CompanyID>
<cbc:CompanyID schemeID="SIREN">123456789</cbc:CompanyID>
</cac:PartyTaxScheme>
<cac:PartyName>
<cbc:Name>Jane's Construction Company</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:AddressLine>456 Market St</cbc:AddressLine>
<cbc:AddressLine>Floor 4</cbc:AddressLine>
<cbc:CityName>New York</cbc:CityName>
<cbc:PostalZone>10001</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>US</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:Contact>
<cbc:Telephone>987-654-3210</cbc:Telephone>
<cbc:ElectronicMail>j@construction.com</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:BuyerCustomerParty>
...
</Invoice>
4. Delivery information
This section contains information about the supply of goods and services.
Path | Description | Example |
---|---|---|
cbc:ActualDeliveryDate | The date on which the supply of goods/service was made | 2023-05-17 |
5. Line items
Line items are individual goods or services enumerated in the invoice. The schema supports one or multiple Line Items per invoice.
5.1 cac:InvoiceLine
This section details each item on an invoice, including unique identifiers, quantities, unit prices, and total amounts before and after taxes. It provides a complete breakdown of costs associated with each invoiced item.
Path | Description | Example |
---|---|---|
cbc:ID | Identifier for this line item; for an aggregated line item invoice the value is 1 | 1 |
cbc:InvoicedQuantity | Quantity of the item invoiced; for an aggregated line item invoice the value is 1 | 1 |
cbc:LineExtensionAmount @currencyID | Total amount for the line item in the original currency, excluding taxes | 1000 |
cac:Item/cbc:Name | Name of the item | Google Cloud |
cac:Price/cbc:PriceAmount @currencyID | Unit price of the item in the original currency | 1000 |
cac:TaxTotal | ||
└ cbc:TaxAmount @currencyID | Total tax amount in the original currency for the line item | 70 |
└ cac:TaxSubtotal/cbc:TaxableAmount @currencyID | Taxable amount in the original currency for the line item | 1000 |
└ cac:TaxSubtotal/cbc:TaxAmount @currencyID | Tax amount in the original currency for the line item | 70 |
└ cac:TaxSubtotal/cac:TaxCategory/cbc:Percent | Tax rate applied to the line item | 7.00 |
└ cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID | Type of tax for this subtotal | VAT |
Example
<Invoice>
...
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity>1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1000</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Google Cloud</cbc:Name>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">1000</cbc:PriceAmount>
</cac:Price>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">230</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">1000</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">230</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:Percent>23.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
</cac:InvoiceLine>
...
</Invoice>
6. Total taxes
This section contains the total taxes applicable to the invoice.
6.1 cac:TaxTotal
This element represents the total tax applicable to the invoice. This element is repeated when both original and local currency need to be presented.
Path | Description | Example |
---|---|---|
cac:TaxTotal/cbc:TaxAmount | Total tax applicable to the invoice | 70.00 |
cac:TaxTotal/cbc:TaxAmount/@currencyID | Currency ID of the tax amount | USD |
6.2 cac:TaxSubtotal
This element provides a breakdown for a single tax category. This element is repeatable to represent different types of tax.
Path | Description | Example |
---|---|---|
cac:TaxTotal/cac:TaxSubtotal/cbc:TaxableAmount @currencyID | Total taxable amount in original currency | 1000.00 |
cac:TaxTotal/cac:TaxSubtotal/cbc:TaxAmount @currencyID | Tax amount on the taxable amount in original currency | 70.00 |
cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:Percent | Tax percentage applicable on the taxable amount | 7 |
cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID | Tax scheme name, enum supporting the list of country specific tax codes | VAT |
Example
<Invoice>
...
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">230</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">1000</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">230</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:Percent>23.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:TaxTotal>
<cac:TaxSubtotal>
<cbc:TaxAmount currencyID="PLN">920</cbc:TaxAmount>
<cbc:TaxableAmount currencyID="PLN">4000</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="PLN">920</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:Percent>23.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
...
</Invoice>
7. Withholding taxes
Withholding taxes applied on the invoice. Withholding tax is a government requirement for the payer of an item of income to withhold or deduct tax from the payment, and pay that tax to the government.
7.1 cac:WithholdingTaxTotal
This element represents the total withholding tax applicable to the invoice.
Should be sum of all cac:WithholdingTaxTotal/cac:TaxSubtotal/cbc:TaxAmount
elements.
Path | Description | Example |
---|---|---|
cac:WithholdingTaxTotal/cbc:TaxAmount @currencyID | The total amount of withholding tax | 6.5 |
7.2 cac:TaxSubtotal
This element provides a breakdown for a single withholding tax category.
Path | Description | Example |
---|---|---|
cac:WithholdingTaxTotal/cac:TaxSubtotal/cbc:TaxableAmount @currencyID | Taxable (pre-tax) amount for the withholding tax category | 1000 |
cac:WithholdingTaxTotal/cac:TaxSubtotal/cbc:TaxAmount @currencyID | The amount of tax for the withholding tax category | 6.5 |
cac:WithholdingTaxTotal/cac:TaxSubtotal/cbc:Percent | The percentage of tax for the withholding tax category | 0.65 |
cac:WithholdingTaxTotal/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID | Type of tax for the withholding tax category | PIS_WTH |
Example
<Invoice>
...
<cac:WithholdingTaxTotal>
<cbc:TaxAmount currencyID="USD">6.5</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">1000</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">6.5</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:Percent>6.5</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>PIS_WTH</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:WithholdingTaxTotal>
...
</Invoice>
8. Payment terms and means
The Payment Terms and Means section outlines the payment expectations including the expected method of payment, payment channel, and due date.
8.1 cac:PaymentMeans/cbc:PaymentMeansCode
This element describes the method of payment. The PaymentMeansCode follows the UN/ECE 4461 code list. Note: The PaymentMeansCode follows the UN/ECE 4461 code list, where 31 stands for Debit (Wire) Transfer.
Path | Description | Example |
---|---|---|
cbc:PaymentMeansCode | Method of payment | 30 for Credit Transfer, 31 for Debit Transfer |
cbc:PaymentDueDate | Due date for the payment | 2023-08-01 |
cac:PayeeFinancialAccount/cbc:ID | Financial account ID of Google (Used in the Invoice scheme) | GB99DEMO12345678901 |
cac:PayerFinancialAccount | ||
└ cbc:ID | Financial account ID of Google (Used in the CreditNote scheme) | GB99DEMO12345678901 |
└ cbc:Name | The name of the Google bank account | Google bank |
└ cbc:AccountTypeCode | A code signifying the type of Google bank account | UNKNOWN_ACCOUNT_TYPE = 0; CHECKING = 1; SAVINGS = 2; CURRENT = 3 |
8.2 cac:PaymentTerms/cbc:Note
This element provides any additional payment terms information in text form.
Path | Description | Example |
---|---|---|
cac:PaymentTerms/cbc:Note | Any additional payment terms information | Net 30 terms |
Example
<Invoice>
...
<cac:PaymentMeans>
<cbc:PaymentMeansCode>30</cbc:PaymentMeansCode>
<cbc:PaymentDueDate>2023-08-01</cbc:PaymentDueDate>
<cac:PayerFinancialAccount>
<cbc:ID>GB99DEMO12345678901</cbc:ID>
</cac:PayerFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>Net 30 terms</cbc:Note>
</cac:PaymentTerms>
...
</Invoice>
9. Legal monetary total
The Legal Monetary Total section summarizes the total amount due on the invoice, including any allowances or charges applied, tax, tax withholding, and the final payable amount.
9.1 cac:LegalMonetaryTotal
Path | Description | Example |
---|---|---|
cbc:LineExtensionAmount @currencyID | The total amount for all Invoice Lines before any allowances or charges are applied. | 1000.00 |
cbc:AllowanceTotalAmount @currencyID | Total allowances for the invoice | 0.00 |
cbc:TaxExclusiveAmount @currencyID | The total amount for all Invoice Lines after any allowances or charges are applied, but before any tax is applied | 950.00 |
cbc:TaxInclusiveAmount @currencyID | The total amount for all Invoice Lines after any allowances or charges and tax are applied | 1071.50 |
cbc:PayableAmount @currencyID | The total amount to be paid by the buyer | 1065.00 |
Example
<Invoice>
...
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">1000.00</cbc:LineExtensionAmount>
<cbc:AllowanceTotalAmount currencyID="USD">0.00</cbc:AllowanceTotalAmount>
<cbc:TaxExclusiveAmount currencyID="USD">1000.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">1230.00</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="USD">1230.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
...
</Invoice>