Skip to content

Instantly share code, notes, and snippets.

@giansalex
Created August 19, 2020 03:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giansalex/1b961c3b5500cdb3692c2e674f79c3c4 to your computer and use it in GitHub Desktop.
Save giansalex/1b961c3b5500cdb3692c2e674f79c3c4 to your computer and use it in GitHub Desktop.
Invoice UBL 2.1 with cryptocurrency payments (BTC).
<?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" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2">
<ext:UBLExtensions>
<ext:UBLExtension>
<ext:ExtensionContent />
</ext:UBLExtension>
</ext:UBLExtensions>
<cbc:UBLVersionID>2.1</cbc:UBLVersionID>
<cbc:CustomizationID>2.0</cbc:CustomizationID>
<cbc:ID>FBTC-1</cbc:ID>
<cbc:IssueDate>2020-08-18</cbc:IssueDate>
<cbc:IssueTime>21:14:03</cbc:IssueTime>
<cbc:InvoiceTypeCode listID="0101">01</cbc:InvoiceTypeCode>
<cbc:Note languageLocaleID="1000"><![CDATA[TWENTY TWO 72/100 DOLLARS]]></cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:PaymentCurrencyCode>BTC</cbc:PaymentCurrencyCode>
<cac:Signature>
<cbc:ID>20000000001</cbc:ID>
<cbc:Note>GREENTER</cbc:Note>
<cac:SignatoryParty>
<cac:PartyIdentification>
<cbc:ID>20000000001</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name><![CDATA[COMPANY 1 Inc]]></cbc:Name>
</cac:PartyName>
</cac:SignatoryParty>
<cac:DigitalSignatureAttachment>
<cac:ExternalReference>
<cbc:URI>#SIGN-GREEN</cbc:URI>
</cac:ExternalReference>
</cac:DigitalSignatureAttachment>
</cac:Signature>
<cac:AccountingSupplierParty>
<cac:Party>
<cac:PartyIdentification>
<cbc:ID schemeID="6">20000000001</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name><![CDATA[COMPANY 1 Inc]]></cbc:Name>
</cac:PartyName>
<cac:PartyLegalEntity>
<cbc:RegistrationName><![CDATA[EMPRESA]]></cbc:RegistrationName>
<cac:RegistrationAddress>
<cbc:ID>150101</cbc:ID>
<cbc:AddressTypeCode>0000</cbc:AddressTypeCode>
<cbc:CitySubdivisionName>-</cbc:CitySubdivisionName>
<cbc:CityName>LIMA</cbc:CityName>
<cbc:CountrySubentity>LIMA</cbc:CountrySubentity>
<cbc:District>LIMA</cbc:District>
<cac:AddressLine>
<cbc:Line><![CDATA[Av. Petit Thouars 211]]></cbc:Line>
</cac:AddressLine>
<cac:Country>
<cbc:IdentificationCode>PE</cbc:IdentificationCode>
</cac:Country>
</cac:RegistrationAddress>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cac:PartyIdentification>
<cbc:ID schemeID="6">20000000002</cbc:ID>
</cac:PartyIdentification>
<cac:PartyLegalEntity>
<cbc:RegistrationName><![CDATA[COMPANY 2 Inc]]></cbc:RegistrationName>
<cac:RegistrationAddress>
<cac:AddressLine>
<cbc:Line><![CDATA[AV CANADA N 12]]></cbc:Line>
</cac:AddressLine>
<cac:Country>
<cbc:IdentificationCode>PE</cbc:IdentificationCode>
</cac:Country>
</cac:RegistrationAddress>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode>999</cbc:PaymentMeansCode>
<cbc:PaymentID schemeName="TX">4aa569cc883f766432cd4bc921e45773ec6f2bfe7bc895efecad5da612e7cb40</cbc:PaymentID>
<cac:PayerFinancialAccount>
<cbc:ID>374w1M3BpRwFtSdRE88UZMDRvP51jKULVZ</cbc:ID>
<cbc:Name>BTC Address</cbc:Name>
<cbc:CurrencyCode>BTC</cbc:CurrencyCode>
</cac:PayerFinancialAccount>
<cac:PayeeFinancialAccount>
<cbc:ID>194KhHZb56oSrfst5CJEZA5G6X1ZdsWv6n</cbc:ID>
<cbc:Name>BTC Address</cbc:Name>
<cbc:CurrencyCode>BTC</cbc:CurrencyCode>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentExchangeRate>
<cbc:SourceCurrencyCode>BTC</cbc:SourceCurrencyCode>
<cbc:TargetCurrencyCode>USD</cbc:TargetCurrencyCode>
<cbc:CalculationRate>11933.15</cbc:CalculationRate>
<cbc:Date>2020-08-18</cbc:Date>
</cac:PaymentExchangeRate>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">3.47</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">19.25</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">3.47</cbc:TaxAmount>
<cac:TaxCategory>
<cac:TaxScheme>
<cbc:ID>1000</cbc:ID>
<cbc:Name>IGV</cbc:Name>
<cbc:TaxTypeCode>VAT</cbc:TaxTypeCode>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">19.25</cbc:LineExtensionAmount>
<cbc:TaxInclusiveAmount currencyID="USD">22.72</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="USD">22.72</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="NIU">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">19.25</cbc:LineExtensionAmount>
<cac:PricingReference>
<cac:AlternativeConditionPrice>
<cbc:PriceAmount currencyID="USD">22.72</cbc:PriceAmount>
<cbc:PriceTypeCode>01</cbc:PriceTypeCode>
</cac:AlternativeConditionPrice>
</cac:PricingReference>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">3.47</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">19.25</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">3.47</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:Percent>18</cbc:Percent>
<cbc:TaxExemptionReasonCode>10</cbc:TaxExemptionReasonCode>
<cac:TaxScheme>
<cbc:ID>1000</cbc:ID>
<cbc:Name>IGV</cbc:Name>
<cbc:TaxTypeCode>VAT</cbc:TaxTypeCode>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:Item>
<cbc:Description><![CDATA[LEDGER 1]]></cbc:Description>
<cac:SellersItemIdentification>
<cbc:ID>P001</cbc:ID>
</cac:SellersItemIdentification>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">19.25</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment