A guide for implementing the cXML language for sending and/or receiving business documents to/from Pagero and our e-business platform Pagero Online.
The purpose of this guide is to complement the official cXML documentation, not replace it. As such, it should be read alongside the Getting Started with cXML and the cXML Reference Guide. |
The cXML version used and referenced in this integration guide is v 1.2.049. |
Introduction
cXML allows buying organizations, suppliers, service providers, and intermediaries to communicate using a single, standard, open language. Successful business-to-business electronic commerce (B2B e-commerce) portals depend upon a flexible, widely adopted protocol. cXML is a well-defined, robust language designed specifically for B2B e-commerce, and it is the choice of high volume buying organizations and suppliers. cXML transactions consist of documents, which are simple text files containing values enclosed by predefined tags. Most types of cXML documents are analogous to hardcopy documents traditionally used in business.
The cXML language is free-to-use and endorsed by many companies within the business-to-business e-commerce landscape.
Because cXML is an XML language, it is thoroughly defined by a set of Document Type Definitions (DTDs). These DTDs are text files that describe the precise syntax and order of cXML elements. DTDs enable applications to validate the cXML they read or write.
The cXML DTD’s can be converted to XSD’s (XML Schema Defintion) files via most XML software. Pagero use the XSD’s for validating files instead of DTD, but there should be no concernible differences in handling for any of the parties involved.
The official cXML website is found here:
An introductory guide to the cXML is found here:
The complete, technical cXML reference guide is found here:
This integration guide mainly focus on the different cXML document types as “standalone” documents/messages/formats.
Target audience
The target audience for this integration guide is IT professionals and system/ERP providers wishing to implement the cXML language for sending and/or receiving business documents to/from Pagero and our e-business platform Pagero Online.
Document structure
This integration guide is structured as follows:
-
Chapter 1 describes the delivery/transport part of the cXML language, i.e. the actual transmission of files.
-
Chapter 2 describes general content and parts shared by all different cXML documents.
-
Chapter 3-7 describes the different cXML documents, i.e. order, order response, invoice etc.
-
Chapter 8 and 9 deals with schemas and validation.
-
Chapter 10 provides example files.
-
Chapter 11 deals with support.
Version and changelog
Version |
Date |
Description |
1.0.3 |
2022-05-17 |
Add support for ten additional order types and order sub types. |
1.0.2 |
2022-02-18 |
Add support for support for Canadian tax numbers, GST, PST, HST and QST. |
1.0.1 |
2021-12-13 |
Add support for external attachments and issuerOfInvoice-party and a few bugfixes and minor adjustments. |
1.0.0 |
2021-03-12 |
First version of this integration guide published. |
1. Sending cXML over HTTP/S
In addition to many common delivery protocols like FTP, SFTP, HTTP/S, AS2, AS4 etc., Pagero support sending and receiving documents via the cXML protocol layered on top of HTTP/HTTPS with its syncronous response handling (i.e. the “Request-Response Model”), as described on pages 17-18 in the cXML Reference guide.
1.1. To Pagero
1.1.1. Endpoints
The endpoints for sending cXML documents to Pagero are:
The sendmode "certified" is used for testing integration towards Pagero Online only, files do not get forwarded to customer.
Initial technical setup is required by our integration team, and bypassing this will result in HTTP 4xx response. |
1.1.2. Response
When sending files to the endpoints listed above, our system returns a synchronous cXML-response in the same HTTP connection as the request. More info on this can be found in section "Response", page 32-36 in the cXML Reference guide.
Please note that this only confirms whether or not the file has been successfully received or if there are any transport related issues. Content level validation is performed at a later stage an in the flow, and as such, this type of response can only be be returned asynchronously, via a separate message.
Example
Example positive response
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/cXML.dtd">
<cXML payloadID="1234567890" timestamp="2021-01-29T19:49:16+00:00" version="1.2.049"> (1)
<Response>
<Status code="201" text="Acknowledged">Acknowledged</Status>
</Response>
</cXML>
1 | @payloadID in the response message corresponds to the payloadID sent in the initial document it responds to. |
Example
Example negative response
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/cXML.dtd">
<cXML payloadID="1234567890" timestamp="2021-01-29T19:49:16+00:00" version="1.2.049">
<Response>
<Status code="400" text="Bad Request">Request unacceptable to the server, although it parsed correctly.</Status>
</Response>
</cXML>
Note that the Header segment is not included in this type of synchronous response, since it is returned in the same HTTP connection as the request.
|
1.2. From Pagero
For customers wishing to receive cXML documents from Pagero, initial technical setup is also required. In this case, we need to know the
-
the endpoint URL’s
-
authentication information, i.e. either:
-
the username and password for the HTTP basic authentication in the HTTP headers.
-
the values expected in the
cXML/Header/Sender/Credentials
-segment, if this is your authentication method of choice (i.e. shared secret).
-
Please contact your account manager if you are interested in this type of setup.
1.2.1. One-way (asynchronous) model
If your application does not require or support the synchronous cXML response discussed above; it is possible to send/receive cXML documents to/from Pagero via any of the other delivery protocols we support, e.g. SFTP, AS2 or even "vanilla" HTTP POSTs.
1.3. Authentication
HTTP Basic Authentication is a requirement when sending documents to Pagero’s cXML endpoints. Pagero does at this point not support authentication based on SharedSecret within the Header-segment nor the MAC- or Auth Transactions-methods described in the “Alternative Authentication Methods”-chapter starting on page 45 in the Getting Started with cXML-guide.
1.4. External attachments
We support external document attachments (i.e. multipart MIME) within the cXML language as described in section "3.1.5 Attachments" of the cXML Reference guide.
The "mixed" subtype of "multipart" is also discussed in RFC2046.
1.5. Batching/multiplexing
Only one Request element is allowed within each cXML root element, i.e. batching/multiplexing of documents within the same file is not supported.
|
2. Description of selected parts of cXML
The cXML language and all its different transactions include A LOT of functionality intended mainly for “cXML <> cXML”-scenarios. This works great if/when all corners of the transaction fully implement and transact cXML only. This was perhaps more common in the the older “point to point”-methodology, whereas much of it is rendered less useful in more current “many to many”-scenarios, where there’s an endless amount of different languages/formats being communicated over just as many different protocols and networks, both proprietary and open. The point being; a lot of this “cXML <> cXML”-specific functionality can be disregarded when implementing standalone cXML-documents for sending to/receiving from Pagero. Some examples of this:
-
Profile transaction, page 45-54 in the cXML Reference guide.
-
Path Routing, page 191-200 in the cXML Reference guide.
-
Get Pending/Data Download Transaction, page 439-444 in the cXML Reference guide.
-
Supply Chain Collaboration, page 455-543 in the cXML Reference guide.
The list can be made long as the cXML language is quite extensive, but this is out of scope of this integration guide.
2.1. Header
The Header
segment is shared by almost all cXML document types and is a technical envelope which contains addressing and authentication information.
Example
Header example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/XYZ.dtd">
<cXML payloadID="1234567890" timestamp="2020-01-09T01:36:05-08:00" xml:lang="en-US">
<Header>
<From>
<Credential domain="NetworkID">(1)
<Identity>0987654321</Identity>(2)
</Credential>
</From>
<To>
<Credential domain="BusinessPartnerId">
<Identity>
<IdReference domain="iso6523" identifier="0007:5566778899"/>(3)
</Identity>
</Credential>
<Credential domain="GLN">
<Identity>12324567890123</Identity>
</Credential>
</To>
<!-- The "Sender"-segment below is generally not used by Pagero -->
<Sender>
<Credential domain="NetworkID">
<Identity>admin@supplier.com</Identity>
<SharedSecret>test123</SharedSecret>
</Credential>
<UserAgent>Sending system</UserAgent>
</Sender>
</Header>
<Request>
<!-- Main business document placed here -->
</Request>
</cXML>
1 | The value of the @domain attribute will be used to identify the type of ID, see Domain below. |
2 | Information in cXML/Header/From/Credential/Identity will be used to identify the sender of the document. |
3 | Information in cXML/Header/To/Credential/(Identity|IdReference) will be used to identify the receiver of the document. The example given is how to send an ISO6523 compliant ID, including its ICD-prefix. |
It is possible to include multiple repetitions of Credentials
within each From/To/Sender
segment, as long as its @domain
attribute is unique.
While the general cXML approach is to rely exclusively on the business ID’s in the Header
segment for recipient matching and document routing, Pagero recommend sending additional business ID’s applicable within the respective business party-segments, e.g. GLN, VAT-/TAX-numbers in particular.
2.1.1. Domain
The @domain
attribute on the Credential
segment is important as it describes the ID type and how it should be parsed.
When sending cXML documents to Pagero Online, the following values can be used:
Attribute value | Description |
---|---|
|
Electronic address identifier. |
|
Internal customer-/supplier-number for the partner in the sending/receiving system. |
|
GS1 Global Location Number. |
|
Finnish party identification number (OVT-tunnus). |
|
Dun & Bradstreet D‑U‑N‑S Number. |
|
Legal entity identifier / organizational number. |
|
VAT/tax/GST identification number. |
The @domain attribute value IS NOT case sensitive. In other words; partnerid will be parsed in the same way as PaRtnERiD or PARTNERID .
|
2.1.2. ISO6523 ICD ID’s
As shown above and below:
Example
ID with ISO6523 ICD prefix example
<Credential domain="BusinessPartnerId">
<Identity>
<IdReference domain="iso6523" identifier="0204:991-99012-32"/>
</Identity>
</Credential>
…it is possible to send ID’s with their corresponding ISO6523 ICD (International Code Designator) as a prefix.
For a list of valid ICD’s, please see OpenPeppol’s ICD-codelist.
For more general information about the ISO6523 standard, see the ISO/IEC 6523 article on Wikipedia.
2.2. Correspondent
The Correspondent
segment can (optionally) be used to give additional information about a party within the From/To/Sender
segments of the Header
.
Example
Correspondent example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/XYZ.dtd">
<cXML payloadID="1234567890" timestamp="2021-03-01T23:53:11-07:00" xml:lang="en-US">
<Header>
<!-- ... -->
<To>
<Credential domain="NetworkId">
<Identity>FR1234567890</Identity>
</Credential>
<Correspondent>
<Contact role="correspondent"> (1)
<Name xml:lang="EN-US">Supplier Company Name S.A.S</Name>
<PostalAddress>
<DeliverTo>Supplier Name</DeliverTo>
<Street>123 Route de Paris</Street>
<City>Paris</City>
<PostalCode>29111</PostalCode>
<Country isoCountryCode="FR"/>
</PostalAddress>
<Email name="">email@email.com</Email>
<Phone>
<TelephoneNumber>
<CountryCode isoCountryCode="FR"/>
<AreaOrCityCode/>
<Number>03-1234567</Number>
</TelephoneNumber>
</Phone>
<Fax name="routing">
<TelephoneNumber>
<CountryCode isoCountryCode="FR"/>
<AreaOrCityCode/>
<Number>03-1234567</Number>
</TelephoneNumber>
</Fax>
</Contact>
</Correspondent>
</To>
<!-- ... -->
</Header>
<!-- ... -->
</cXML>
1 | The @role attribute is used to identify the various different roles a party can have. |
The Correspondent
segment can be of special value in the order, order response and despatch advice documents, since these have somewhat limited support for sending explicit party-information within the actual Request
.
2.3. Contact
The Contact
segment is used within the actual Request
to give information about parties. Please note the different placement compared to the From/To/Sender
segments within the Header
.
Example
Contact example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/XYZ.dtd">
<cXML payloadID="1234567890" timestamp="2021-03-01T23:53:11-07:00" xml:lang="en-US">
<!-- ... -->
<Request>
<!-- ... -->
<Contact role="shipFrom"> (1)
<Name xml:lang="en-US">Seller Org LLC</Name>
<PostalAddress> (2)
<Street>100 Long Rd</Street>
<City>Los Angeles</City>
<State>CA</State>
<PostalCode>12087</PostalCode>
<Country isoCountryCode="US">United States</Country>
</PostalAddress>
</Contact>
<!-- ... -->
</Request>
</cXML>
1 | The @role attribute is used to identify the various different roles a party can have. |
2 | Postal address of the party/contact. |
2.3.1. Party roles
The following is a selection of example values that can be used for the ../Contact/@role
attribute:
Role | Description |
---|---|
|
The party receiving the document. |
|
The buying party. |
|
The payment receiver (usually the seller). |
|
The party issuing the document (invoice and credit note only). |
|
The party handling the shipment. |
|
The party receiving the shipment. |
2.3.2. IdReference
The @domain
attribute within the IdReference
segment, located at the party level, can be used similarly to the @domain
attribute within the Credential segment. This attribute is used to describe the type of ID and provide instructions on how party identifiers should be parsed for the relevant party. The #supported header ID types can be used as values for this attribute, and the corresponding ID should be transmitted using the identifier
attribute.
Example
IdReference example with internal customer number
<IdReference domain="PartnerID" identifier="123456789"/>
2.4. Money
The Money segment is used extensively throughout the different cXML documents. It has three possible attributes: currency
, alternateAmount
, alternateCurrency
. All currency codes should be coded in compliance with ISO4217.
Example
Money example
<Money currency="USD">12.34</Money>
The optional alternateCurrency
and alternateAmount
attributes are used together to specify an amount in an alternate currency. These can be used to support dual-currency requirements such as the euro, e.g.:
Example
Alternate currency example
<Money currency="USD" alternateCurrency="EUR" alternateAmount="14.28">12.34</Money>
2.5. Extrinsic
The Extrinsic
element can be used as an "additional data bearer" for information/data that isn’t explicitly handled in a structured way anywhere else in the cXML language.
The Extrinsic
element is available on both header and line level.
Example
Extrinsic example
<Extrinsic name="buyerVatID">FR1111222333</Extrinsic>
<Extrinsic name="atcud">0</Extrinsic>
<Extrinsic name="testAttribute">testValue</Extrinsic>
@name | Description | Document type |
---|---|---|
|
The buyer’s tax number |
Invoice, Credit note, Order |
|
The supplier’s tax number |
Invoice, Credit note, Order |
|
The seller’s VAT registration |
Invoice, Credit note |
|
AT certified program hash (used in CIUS-PT) |
Invoice, Credit note |
|
AT certified program number (used in CIUS-PT) |
Invoice, Credit note |
|
QR code |
Invoice, Credit note |
|
ATCUD |
Invoice, Credit note |
|
Payment terms description |
Invoice, Credit note, Order |
|
Delivery date |
Invoice, Credit note |
|
Describes when the Blanket order is open and when it’s closed out (date range) |
Order |
|
Type of consignment Order |
Order |
Except for the select few @name
attributes in the table above, we map all Extrinsic
data as free text key:value-pairs with the @name
value as key, and the actual element value as its value. This is done on both document- and line-level, and will allow for the information to be forwarded to other, non-cXML formats.
3. Order
Relevant chapter in the cXML Reference guide:
-
Purchase Orders, pages 103-190
3.1. Structure
Example
Order request structure
<OrderRequest>
<OrderRequestHeader>
<Total/>
<ShipTo/>
<BillTo/>
<LegalEntity/>
<OrganizationUnit/>
<Shipping/>
<Tax/>
<Payment/>
<PaymentTerm/>
<Contact/>
<Comments/>
<Followup/>
<ControlKeys/>
<DocumentReference/>
<SupplierOrderInfo/>
<TermsOfDelivery/>
<DeliveryPeriod/>
<IdReference/>
<OrderRequestHeaderIndustry/>
<Extrinsic/>
</OrderRequestHeader>
<ItemOut>
<ItemID/>
<Path/>
<ItemDetail/> | <BlanketItemDetail/>
<SupplierID/> | <SupplierList/>
<ShipTo/>
<Shipping/>
<Tax/>
<SpendDetail/>
<Distribution/>
<Contact/>
<TermsOfDelivery/>
<Comments/>
<Tolerances/>
<ControlKeys/>
<ScheduleLine/>
<MasterAgreementReference/> | <MasterAgreementIDInfo/>
<ItemOutIndustry/>
<Packaging/>
<ReleaseInfo/>
<Batch/>
</ItemOut>
</OrderRequest>
3.2. OrderRequestHeader
The header level of the order document.
3.2.1. Order type
There are two attributes in the OrderRequestHeader
related to type:
-
@orderType
- describing the type of order -
@type
- describing the message operation
Type
For @orderType
, the following values are supported by Pagero today:
Value | Description | UNCL1001 equivalent |
---|---|---|
|
Document/message issued within an enterprise to initiate the purchase of articles, materials or services required for the production or manufacture of goods to be offered for sale or otherwise supplied to customers. |
105 |
|
Document/message issued within an enterprise ordering the taking out of stock of goods. |
120 |
|
Document/message by means of which a buyer initiates a transaction with a seller involving the supply of goods or services as specified, according to conditions set out in an offer, or otherwise known to the buyer. |
220 |
|
Usage of document/message for general order purposes with later split into quantities and delivery dates and maybe delivery locations. |
221 |
|
Document/message ordering the remainder of a production’s batch. |
222 |
|
Document/message for goods in leasing contracts. |
223 |
|
Document/message for urgent ordering. |
224 |
|
Document/message to provide split quantities and delivery dates referring to a previous blanket order. |
226 |
|
Order to deliver goods into stock with agreement on payment when goods are sold out of this stock. |
227 |
|
Document/message to order samples. |
228 |
|
Document/message informing buyer or seller of the replacement of goods previously ordered. |
229 |
|
A document or message to order cross docking services. |
237 |
|
An order to supply fixed quantities of products at fixed regular intervals. |
258 |
Sub type
Some systems and trading partners use order sub types.
This can be sent as follows on header level:
<Extrinsic name="orderSubType">consignmentBillReplenish</Extrinsic>
This is mapped and forwarded as free form text in select formats.
Please consult your trading partner before implementing order sub types. Not all systems/formats support it, and as such its use would have to be bilaterally agreed. |
Operation (@type)
For the order types mentioned above, the OrderRequestHeader/@type
attribute value (i.e. describing the message operation) only accepts new
.
Order change
To identify an order change, the OrderRequestHeader/@type
attribute value should be update
.
Order change is interpreted by us as its own document type, separate from regular (initial) orders. As such, you have to have a separate agreement and communication setup for the document type. |
Order cancellation
To identify an order cancellation, the OrderRequestHeader/@type
attribute value should be delete
.
Order cancellation is interpreted by us as its own document type, separate from regular (initial) orders. As such, you have to have a separate agreement and communication setup for the document type. |
3.3. Full order example
Example
Purchase order request example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/cXML.dtd">
<cXML
payloadID="1234567890"
timestamp="2021-04-24T02:22:02+00:00"
xml:lang="en-US">
<Header>
<From>
<Credential domain="SystemID">
<Identity>11111</Identity>
</Credential>
</From>
<To>
<Credential domain="PrivateID">
<Identity>000001234</Identity>
</Credential>
<Correspondent>
<Contact role="correspondent">
<Name xml:lang="EN-US">Supplier Company Name S.A.S</Name>
<PostalAddress>
<DeliverTo>Supplier Name</DeliverTo>
<Street>123 Route de Paris</Street>
<City>Paris</City>
<PostalCode>29111</PostalCode>
<Country isoCountryCode="FR"/>
</PostalAddress>
<Email name="Abc">email@email.com</Email>
<Phone>
<TelephoneNumber>
<CountryCode isoCountryCode="FR"/>
<AreaOrCityCode/>
<Number>03-1234567</Number>
</TelephoneNumber>
</Phone>
<Fax name="routing">
<TelephoneNumber>
<CountryCode isoCountryCode="FR"/>
<AreaOrCityCode/>
<Number>03-1234567</Number>
</TelephoneNumber>
</Fax>
</Contact>
</Correspondent>
</To>
<Sender>
<Credential domain="NetworkID">
<Identity>11111</Identity>
<SharedSecret>ABC</SharedSecret>
</Credential>
<UserAgent>Sending system</UserAgent>
</Sender>
</Header>
<Request deploymentMode="test">
<OrderRequest>
<OrderRequestHeader
orderDate="2021-04-24T02:22:02-05:00"
orderID="12345"
orderType="regular"
type="new">
<Total>
<Money currency="EUR">2315.0300</Money>
</Total>
<ShipTo>
<Address isoCountryCode="FR">
<Name xml:lang="en-US">French goods receiver S.A.S.</Name>
<PostalAddress>
<DeliverTo>ABC International S.A.S.</DeliverTo>
<Street>Rue de delivery 1</Street>
<City>Montmatre</City>
<Municipality/>
<State>42</State>
<PostalCode>12350</PostalCode>
<Country isoCountryCode="FR"/>
</PostalAddress>
<Phone>
<TelephoneNumber>
<CountryCode isoCountryCode="FR"/>
<AreaOrCityCode/>
<Number>(33)0238373123</Number>
</TelephoneNumber>
</Phone>
</Address>
</ShipTo>
<BillTo>
<Address isoCountryCode="FR">
<Name xml:lang="E">French buyer S.A.S.</Name>
<PostalAddress name="Buyer S.A.S.">
<Street>201 Rue De Paris</Street>
<Street>Le Parisienne</Street>
<City>Paris</City>
<State>72</State>
<PostalCode>92226</PostalCode>
<Country isoCountryCode="FR"/>
</PostalAddress>
</Address>
</BillTo>
<Contact role="privateEndUser">
<Name xml:lang="en-US">Procurement Contact</Name>
<Email>a@b.cd</Email>
<Phone>
<TelephoneNumber>
<CountryCode isoCountryCode=""/>
<AreaOrCityCode/>
<Number>0032 12345678</Number>
</TelephoneNumber>
</Phone>
</Contact>
<Comments>Header Comment</Comments>
<Extrinsic name="buyerVatID">FR123123212</Extrinsic>
<Extrinsic name="IncoTermDesc">DDP Delivered Duty Paid</Extrinsic>
</OrderRequestHeader>
<ItemOut
agreementItemNumber="20000"
lineNumber="00010"
quantity="3.000"
requestedDeliveryDate="2021-06-01T02:22:02-05:00">
<ItemID>
<SupplierPartID>111</SupplierPartID>
<BuyerPartID>00000000000111</BuyerPartID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="EUR">394.3200</Money>
</UnitPrice>
<Description xml:lang="en-US">500ML Lotion</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
<PriceBasisQuantity conversionFactor="175" quantity="1000">
<UnitOfMeasure>PCE</UnitOfMeasure>
<Description xml:lang="en-US">3 * 175 items * 394,32 EUR / 1.000 items</Description>
</PriceBasisQuantity>
<Classification domain=""/>
</ItemDetail>
<Comments>Item Comments</Comments>
<MasterAgreementIDInfo agreementID=""/>
</ItemOut>
<ItemOut
agreementItemNumber="300000"
lineNumber="00030"
quantity="9.000"
requestedDeliveryDate="2021-04-25T02:22:02-05:00">
<ItemID>
<SupplierPartID>222</SupplierPartID>
<BuyerPartID>00000000000222</BuyerPartID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="EUR">1643.0100</Money>
</UnitPrice>
<Description xml:lang="en-US">2000ML Hand wash</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
<PriceBasisQuantity conversionFactor="45" quantity="1000">
<UnitOfMeasure>PCE</UnitOfMeasure>
<Description xml:lang="en-US">9 * 45 items * 1.643,01 EUR / 1.000 items</Description>
</PriceBasisQuantity>
<Classification domain=""/>
</ItemDetail>
<Comments>Item Comment</Comments>
<MasterAgreementIDInfo agreementID=""/>
</ItemOut>
<ItemOut
agreementItemNumber="400000"
lineNumber="00040"
quantity="25.000"
requestedDeliveryDate="2021-04-25T02:22:02-05:00">
<ItemID>
<SupplierPartID>333</SupplierPartID>
<BuyerPartID>00000000000333</BuyerPartID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="EUR">591.4800</Money>
</UnitPrice>
<Description xml:lang="en-US">1000ML Hand sanitizer</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
<PriceBasisQuantity conversionFactor="68" quantity="1000">
<UnitOfMeasure>PCE</UnitOfMeasure>
<Description xml:lang="en-US">25 * 68 items * 591,48 EUR / 1.000 items</Description>
</PriceBasisQuantity>
<Classification domain=""/>
</ItemDetail>
<Comments/>
<MasterAgreementIDInfo agreementID=""/>
</ItemOut>
<ItemOut
agreementItemNumber="500000"
lineNumber="00050"
quantity="2.000"
requestedDeliveryDate="2021-06-01T02:22:02-05:00">
<ItemID>
<SupplierPartID>444</SupplierPartID>
<BuyerPartID>00000000000444</BuyerPartID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="EUR">81.8900</Money>
</UnitPrice>
<Description xml:lang="en-US">10ML Balm</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
<PriceBasisQuantity conversionFactor="1000" quantity="1000">
<UnitOfMeasure>PCE</UnitOfMeasure>
<Description xml:lang="en">2 * 1.000 items * 81,89 EUR / 1.000 items</Description>
</PriceBasisQuantity>
<Classification domain=""/>
</ItemDetail>
<Comments/>
<MasterAgreementIDInfo agreementID=""/>
</ItemOut>
<ItemOut
agreementItemNumber="60000"
lineNumber="00060"
quantity="6.000"
requestedDeliveryDate="2021-06-13T02:22:02-05:00">
<ItemID>
<SupplierPartID>555</SupplierPartID>
<BuyerPartID>00000000000555</BuyerPartID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="EUR">55.2100</Money>
</UnitPrice>
<Description xml:lang="en-US">Bandaids 4x2</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
<PriceBasisQuantity conversionFactor="825" quantity="1000">
<UnitOfMeasure>PCE</UnitOfMeasure>
<Description xml:lang="en-US">6 * 825 items * 55,21 EUR / 1.000 items</Description>
</PriceBasisQuantity>
<Classification domain=""/>
</ItemDetail>
<Comments/>
<MasterAgreementIDInfo agreementID=""/>
</ItemOut>
</OrderRequest>
</Request>
</cXML>
4. Order Response
Relevant chapter in the cXML Reference guide:
-
ConfirmationRequest, pages 297-313
Note that this should not be confused with the simpler StatusUpdateRequest
document or the synchronous cXML response given in the Request-Response transaction described in [cXML Response], the latter being a message level response more like a technical acknowledgement/receipt, unrelated to the actual content of the order itself.
The ConfirmationRequest
is a more advanced order response/confirmation document that allows for more detailed item level- and shipping information. In addition to supporting the acceptance/rejection of an entire order, of course.
4.1. Structure
Example
Order response structure
<ConfirmationRequest>
<ConfirmationHeader confirmID="123" type="accept|except|reject|detail"/>
<OrderReference/>
<ConfirmationItem>
<UnitOfMeasure/>
<ConfirmationStatus>
<UnitOfMeasure/>
<ItemIn>
<ItemID>
<SupplierPartID/>
<SupplierPartAuxiliaryID/>
<BuyerPartID/>
</ItemID>
<ItemDetail>
<UnitPrice/>
<Description/>
<UnitOfMeasure/>
<PriceBasisQuantity/>
<Classification/>
</ItemDetail>
</ItemIn>
</ConfirmationStatus>
</ConfirmationItem>
</ConfirmationRequest>
4.2. ConfirmationHeader
The header level of the order response document.
4.2.1. Order response type
A (ConfirmationRequest-)document is one of the following types, specified by the type attribute of the ConfirmationHeader element: “accept,” “allDetail,” “detail,” “backordered,” “except,” “reject,” “requestToPay,” and “replace.” With a type of “detail”, you can update portions of a purchase order, such as prices, quantities, and delivery dates, reject portions, and add tax and shipping information. Only the line items mentioned are changed. With a type of “allDetail”, you can update all information of specified line items without rejecting or accepting the order. You can apply the confirmation to the entire order request using the types “accept”, “reject”, and “except”. “allDetail” and “detail” update individual lines, they do not accept or reject the entire order.
The following order response types are supported by Pagero today:
Type | Description |
---|---|
|
The entire order is accepted without changes (item information allowed) |
|
The entire order is accepted without changes (item information NOT allowed) |
|
The entire order is rejected without changes. |
|
The order is accepted but with changes/amendments. |
4.2.2. OrderReference
The @orderID
attribute on the OrderReference
element is used to reference the initial order.
4.3. Line item information
The general recommendation is that line item information (ItemIn
) should be omitted when accepting/rejecting an entire order. In other words; only send line item information if/when they include changes.
Please also note:
While suppliers send multiple confirmations for a purchase order, each confirmation must mention a line item only once. In addition, a line item must not be mentioned in more than one confirmation request. Multiple confirmations are allowed, and sensible, only for “allDetail” or “detail”. Only one confirmation per order is allowed for “accept”, “except”, or “reject”. When a confirmation with one of these types arrives, the receiving system must discard all previous confirmations for the purchase order.
…which is generally considered good practice when dealing with order response documents.
4.4. Full order response example
Example
Order response example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/Fulfill.dtd">
<cXML
payloadID="1234567890"
timestamp="2021-05-02T00:00:27-07:00"
xml:lang="en-US">
<Header>
<From>
<Credential domain="NetworkID">
<Identity>11111</Identity>
</Credential>
</From>
<To>
<Credential domain="NetworkID">
<Identity>22222</Identity>
</Credential>
</To>
<Sender>
<Credential domain="NetworkID">
<Identity>11111</Identity>
<SharedSecret>ABC</SharedSecret>
</Credential>
<UserAgent>Sending system</UserAgent>
</Sender>
</Header>
<Request deploymentMode="test">
<ConfirmationRequest>
<ConfirmationHeader
confirmID="123456789"
noticeDate="2021-05-02T22:33:27-07:00"
operation="new"
type="allDetail"/>
<OrderReference orderID="12345">
<DocumentReference payloadID="0987654321"/>
</OrderReference>
<ConfirmationItem
lineNumber="00030"
quantity="9">
<UnitOfMeasure>CS</UnitOfMeasure>
<ConfirmationStatus
deliveryDate="2021-05-17T03:00:00-07:00"
quantity="3"
shipmentDate="2021-05-03T15:00:00-07:00"
type="accept">
<UnitOfMeasure>CS</UnitOfMeasure>
<ItemIn lineNumber="00030" quantity="3">
<ItemID>
<SupplierPartID>222</SupplierPartID>
<SupplierPartAuxiliaryID/>
<BuyerPartID>00000000000222</BuyerPartID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="EUR">1643.0100</Money>
</UnitPrice>
<Description xml:lang="E">2000ML Hand wash</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
<PriceBasisQuantity conversionFactor="45" quantity="1000">
<UnitOfMeasure>PCE</UnitOfMeasure>
<Description xml:lang="en-US">9 * 45 items * 1.643,01 EUR / 1.000 items</Description>
</PriceBasisQuantity>
<Classification domain=""/>
</ItemDetail>
</ItemIn>
</ConfirmationStatus>
<ConfirmationStatus
deliveryDate="2021-05-25T03:00:00-07:00"
quantity="6"
shipmentDate="2021-05-16T15:00:00-07:00"
type="backordered">
<UnitOfMeasure>CS</UnitOfMeasure>
<ItemIn lineNumber="00030" quantity="6">
<ItemID>
<SupplierPartID>222</SupplierPartID>
<SupplierPartAuxiliaryID/>
<BuyerPartID>00000000000222</BuyerPartID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="EUR">1643.0100</Money>
</UnitPrice>
<Description xml:lang="E">2000ML Hand wash</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
<PriceBasisQuantity conversionFactor="45" quantity="1000">
<UnitOfMeasure>PCE</UnitOfMeasure>
<Description xml:lang="en-US">9 * 45 items * 1.643,01 EUR / 1.000 items</Description>
</PriceBasisQuantity>
<Classification domain=""/>
</ItemDetail>
</ItemIn>
</ConfirmationStatus>
</ConfirmationItem>
<ConfirmationItem
lineNumber="00050"
quantity="2">
<UnitOfMeasure>CS</UnitOfMeasure>
<ConfirmationStatus
deliveryDate="2021-06-01T03:00:00-07:00"
quantity="1"
shipmentDate="2021-05-18T15:00:00-07:00"
type="allDetail">
<UnitOfMeasure>CS</UnitOfMeasure>
<ItemIn lineNumber="00050" quantity="1">
<ItemID>
<SupplierPartID>444</SupplierPartID>
<SupplierPartAuxiliaryID/>
<BuyerPartID>00000000000444</BuyerPartID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="EUR">80.89</Money>
</UnitPrice>
<Description xml:lang="E">10ML Balm</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
<PriceBasisQuantity conversionFactor="1000" quantity="1000">
<UnitOfMeasure>PCE</UnitOfMeasure>
<Description xml:lang="en-US">2 * 1.000 items * 81,89 EUR / 1.000 items</Description>
</PriceBasisQuantity>
<Classification domain=""/>
</ItemDetail>
</ItemIn>
</ConfirmationStatus>
<ConfirmationStatus
deliveryDate="2021-06-01T03:00:00-07:00"
quantity="1"
shipmentDate="2021-05-03T15:00:00-07:00"
type="backordered">
<UnitOfMeasure>CS</UnitOfMeasure>
<ItemIn lineNumber="00050" quantity="1">
<ItemID>
<SupplierPartID>444</SupplierPartID>
<SupplierPartAuxiliaryID/>
<BuyerPartID>00000000000444</BuyerPartID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="EUR">81.8900</Money>
</UnitPrice>
<Description xml:lang="E">10ML Balm</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
<PriceBasisQuantity conversionFactor="1000" quantity="1000">
<UnitOfMeasure>PCE</UnitOfMeasure>
<Description xml:lang="en-US">2 * 1.000 items * 81,89 EUR / 1.000 items</Description>
</PriceBasisQuantity>
<Classification domain=""/>
</ItemDetail>
</ItemIn>
</ConfirmationStatus>
</ConfirmationItem>
</ConfirmationRequest>
</Request>
</cXML>
5. Despatch Advice/ASN
Relevant chapter in the cXML Reference guide:
-
ShipNoticeRequest, pages 314-335
Suppliers use the ShipNoticeRequest
document to send shipment information about orders.
This transaction describes a single shipment and can contain portions of multiple orders as well as hazard information for the entire shipment or individual line items.
The DTD for this transaction is contained in Fulfill.dtd rather than cXML.dtd .
|
5.1. Structure
Example
Despatch advice structure
<ShipNoticeRequest>
<ShipNoticeHeader>
<Contact role="shipFrom"/>
<Contact role="shipTo"/>
<Extrinsic/>
</ShipNoticeHeader>
<ShipControl>
<CarrierIdentifier/>
<ShipmentIdentifier/>
<TransportInformation/>
</ShipControl>
<ShipNoticePortion>
<OrderReference/>
<ShipNoticeItem>
<ItemID>
<SupplierPartID/>
<BuyerPartID/>
</ItemID>
<ShipNoticeItemDetail>
<UnitPrice>
<Money/>
</UnitPrice>
<Description/>
<UnitOfMeasure/>
</ShipNoticeItemDetail>
<UnitOfMeasure/>
<AssetInfo/>
</ShipNoticeItem>
</ShipNoticePortion>
</ShipNoticeRequest>
5.2. Full despatch advice/ASN example
Example
Despatch advice/ASN example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/Fulfill.dtd">
<cXML
payloadID="1234567890"
timestamp="2021-05-02T00:52:11-07:00"
xml:lang="en-US">
<Header>
<From>
<Credential domain="NetworkID">
<Identity>11111</Identity>
</Credential>
</From>
<To>
<Credential domain="NetworkID">
<Identity>22222</Identity>
</Credential>
</To>
<Sender>
<Credential domain="NetworkID">
<Identity>11111</Identity>
<SharedSecret>ABC</SharedSecret>
</Credential>
<UserAgent>Sending system</UserAgent>
</Sender>
</Header>
<Request deploymentMode="test">
<ShipNoticeRequest>
<ShipNoticeHeader
noticeDate="2021-05-02T23:53:11-07:00"
operation="new"
shipmentDate="2021-05-04T03:00:00-07:00"
shipmentID="12345">
<Contact role="shipFrom">
<Name xml:lang="en-US">Supplier Company LLC</Name>
<PostalAddress>
<Street>100 Corner st.</Street>
<City>Baltimore</City>
<State>MD</State>
<PostalCode>12087</PostalCode>
<Country isoCountryCode="US">United States</Country>
</PostalAddress>
</Contact>
<Contact role="shipTo">
<Name xml:lang="en-US">French goods receiver S.A.S.</Name>
<PostalAddress>
<DeliverTo>ABC International S.A.S.</DeliverTo>
<Street>Rue de delivery 1</Street>
<City>Montmatre</City>
<Municipality/>
<State>42</State>
<PostalCode>12350</PostalCode>
<Country isoCountryCode="FR"/>
</PostalAddress>
</Contact>
<Extrinsic name="totalOfPackages">1</Extrinsic>
</ShipNoticeHeader>
<ShipControl>
<CarrierIdentifier domain="companyName">UPS</CarrierIdentifier>
<ShipmentIdentifier>123123123123123123</ShipmentIdentifier>
<TransportInformation>
<ShippingContractNumber/>
<ShippingInstructions>
<Description xml:lang="en-US"/>
</ShippingInstructions>
</TransportInformation>
</ShipControl>
<ShipNoticePortion>
<OrderReference orderID="12345">
<DocumentReference payloadID="1232556"/>
</OrderReference>
<ShipNoticeItem
lineNumber="00010"
quantity="3.000"
shipNoticeLineNumber="1">
<ItemID>
<SupplierPartID>111</SupplierPartID>
<BuyerPartID>00000000000111</BuyerPartID>
</ItemID>
<ShipNoticeItemDetail>
<UnitPrice>
<Money currency="EUR">394.3200</Money>
</UnitPrice>
<Description xml:lang="en-US">500ML Lotion</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
</ShipNoticeItemDetail>
<UnitOfMeasure>CS</UnitOfMeasure>
<AssetInfo serialNumber="SERIAL#1 AAA111"/>
<AssetInfo serialNumber="SERIAL#2 BBB222"/>
<AssetInfo serialNumber="SERIAL#3 CCC333"/>
</ShipNoticeItem>
<ShipNoticeItem
lineNumber="00030"
quantity="2.000"
shipNoticeLineNumber="2">
<ItemID>
<SupplierPartID>222</SupplierPartID>
<BuyerPartID>00000000000222</BuyerPartID>
</ItemID>
<ShipNoticeItemDetail>
<UnitPrice>
<Money currency="EUR">1643.0100</Money>
</UnitPrice>
<Description xml:lang="en-US">2000ML Hand wash</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
</ShipNoticeItemDetail>
<UnitOfMeasure>CS</UnitOfMeasure>
<Batch expirationDate="2021-05-18T07:00:00-07:00">
<SupplierBatchID>BATCH A</SupplierBatchID>
</Batch>
</ShipNoticeItem>
<ShipNoticeItem
lineNumber="00030"
quantity="3.000"
shipNoticeLineNumber="3">
<ItemID>
<SupplierPartID>222</SupplierPartID>
<BuyerPartID>00000000000222</BuyerPartID>
</ItemID>
<ShipNoticeItemDetail>
<UnitPrice>
<Money currency="EUR">1643.0100</Money>
</UnitPrice>
<Description xml:lang="en-US">2000ML Hand wash</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
</ShipNoticeItemDetail>
<UnitOfMeasure>CS</UnitOfMeasure>
<Batch expirationDate="2021-07-12T09:00:00-07:00">
<SupplierBatchID>BATCH B</SupplierBatchID>
</Batch>
</ShipNoticeItem>
<ShipNoticeItem
lineNumber="00030"
quantity="4.000"
shipNoticeLineNumber="4">
<ItemID>
<SupplierPartID>222</SupplierPartID>
<BuyerPartID>00000000000222</BuyerPartID>
</ItemID>
<ShipNoticeItemDetail>
<UnitPrice>
<Money currency="EUR">1643.0100</Money>
</UnitPrice>
<Description xml:lang="en-US">2000ML Hand wash</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
</ShipNoticeItemDetail>
<UnitOfMeasure>CS</UnitOfMeasure>
<Batch expirationDate="2021-08-20T02:00:00-07:00">
<SupplierBatchID>BATCH C</SupplierBatchID>
</Batch>
</ShipNoticeItem>
<ShipNoticeItem
lineNumber="00040"
quantity="25.000"
shipNoticeLineNumber="5">
<ItemID>
<SupplierPartID>333</SupplierPartID>
<BuyerPartID>00000000000333</BuyerPartID>
</ItemID>
<ShipNoticeItemDetail>
<UnitPrice>
<Money currency="EUR">591.4800</Money>
</UnitPrice>
<Description xml:lang="en-US">1000ML Hand sanitizer</Description>
<UnitOfMeasure>CS</UnitOfMeasure>
</ShipNoticeItemDetail>
<UnitOfMeasure>CS</UnitOfMeasure>
</ShipNoticeItem>
</ShipNoticePortion>
</ShipNoticeRequest>
</Request>
</cXML>
6. Invoice
Relevant chapter in the cXML Reference guide:
-
Invoices, pages 342-398
6.1. Structure
Example
Example invoice structure
<InvoiceDetailRequest>
<InvoiceDetailRequestHeader>
<InvoiceDetailHeaderIndicator/>
<InvoiceDetailLineIndicator/>
<InvoicePartner>
<Contact role="remitTo|billTo|remitTo|from|soldTo"/>
</InvoicePartner>
<InvoiceDetailShipping>
<Contact role="shipFrom|shipTo"/>
</InvoiceDetailShipping>
<InvoiceDetailPaymentTerm/>
<Comments/>
<Extrinsic/>
</InvoiceDetailRequestHeader>
<InvoiceDetailOrder>
<InvoiceDetailOrderInfo>
<OrderReference/>
</InvoiceDetailOrderInfo>
<InvoiceDetailItem>
<UnitOfMeasure/>
<UnitPrice/>
<PriceBasisQuantity/>>
<InvoiceDetailItemReference/>
<SubtotalAmount/>
<Tax/>
<GrossAmount/>
<TotalAmountWithoutTax/>
<NetAmount/>
</InvoiceDetailItem>
</InvoiceDetailOrder>
<InvoiceDetailSummary>
<SubtotalAmount/>
<Tax/>
<GrossAmount/>
<InvoiceHeaderModifications/>
<TotalCharges/>
<TotalAmountWithoutTax/>
<NetAmount/>
<DueAmount/>
</InvoiceDetailSummary>
</InvoiceDetailRequest>
6.2. InvoiceDetailRequestHeader
The header level of an invoice document.
InvoiceDetailOrder elements are for detailed (line-item level) invoices and InvoiceDetailHeaderOrder elements are for header invoices. Invoices must not contain both types of elements. Both types of elements contain invoice lines.
All invoice line level amounts must add up to the total specified in InvoiceDetailSummary.
6.2.1. Purpose
The @purpose
attribute describes the "sub type" of the invoice. The following values are supported by Pagero today:
Version | Description |
---|---|
|
A standard billing statement from the supplier to the buying organization. |
|
A credit memo for issuing credit to the buying organization. |
|
A line-item credit memo for issuing credit to the buying organization. |
6.2.2. Operation
The @operation
attribute describes the operation of the invoice. The value delete
is not supported by Pagero. Only new
is supported today.
6.3. Party identifiers
Different party identifiers can be sent like this:
ID | Path |
---|---|
Internal customer number |
|
Legal business identifier |
|
VAT number |
|
GST number |
|
PST number |
|
HST number |
|
QST number |
|
Example InvoicePartner with internal customer number and GST id
<InvoicePartner>
<Contact role="remitTo">
<!-- ... -->
</Contact>
<IdReference identifier="123456789" domain="gstID"/>
<IdReference identifier="1234" domain="partnerID"/>
</InvoicePartner>
Buyer and supplier VAT-number can also be sent in Extrinsic
elements outside the party-structure, e.g.:
Example VAT number extrinsic
<InvoiceDetailRequest>
<InvoiceDetailRequestHeader>
<!-- ... -->
<Extrinsic name="buyerVatID">DE111111111</Extrinsic>(1)
<Extrinsic name="supplierVatID">DE222222222</Extrinsic>(2)
<!-- ... -->
</InvoiceDetailRequestHeader>
<!-- ... -->
</InvoiceDetailRequest>
1 | Buyer VAT number |
2 | Supplier VAT number |
Please note that the @name attribute value has to match the ones in the example above.
6.4. Calculation of amounts
6.4.1. Line level
Value | Calculation formula |
---|---|
Line net amount |
(unit price * quantity) – discounts + charges |
Line tax amount |
(net amount * tax rate) / 100 |
Line total amount |
net amount + tax amount |
6.4.2. Document level
Value | Calculation formula |
---|---|
Invoice total net amount |
Sum of all invoice line’s net amounts – discounts on document level + charges on document level |
Invoice total tax amount |
Sum of all tax amounts |
Invoice total amount (payable amount) |
Invoice total net amount + invoice total tax amount + rounding amount (if applicable) |
6.5. Full invoice example
Example
Example invoice
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/InvoiceDetail.dtd">
<cXML
payloadID="1234567890"
timestamp="2021-05-03T02:50:02-07:00">
<Header>
<From>
<Credential domain="NetworkID">
<Identity>11111</Identity>
</Credential>
</From>
<To>
<Credential domain="NetworkID">
<Identity>22222</Identity>
</Credential>
</To>
<Sender>
<Credential domain="NetworkID">
<Identity>11111</Identity>
<SharedSecret>ABC</SharedSecret>
</Credential>
<UserAgent>Sending system</UserAgent>
</Sender>
</Header>
<Request deploymentMode="test">
<InvoiceDetailRequest>
<InvoiceDetailRequestHeader
invoiceDate="2021-05-03T02:50:02+02:00"
invoiceID="12345"
operation="new"
purpose="standard">
<InvoiceDetailHeaderIndicator/>
<InvoiceDetailLineIndicator isTaxInLine="yes"/>
<InvoicePartner>
<Contact role="remitTo">
<Name xml:lang="fr">Supplier GmbH</Name>
<PostalAddress>
<Street>Street 1</Street>
<City>Berlin</City>
<PostalCode>12345</PostalCode>
<Country isoCountryCode="DE">Germany</Country>
</PostalAddress>
</Contact>
</InvoicePartner>
<InvoicePartner>
<Contact role="billTo">
<Name xml:lang="de">ABC International GmbH</Name>
<PostalAddress name="ABC International GmbH">
<Street>Street 4</Street>
<Street>1130</Street>
<City>Berlin</City>
<PostalCode>12324</PostalCode>
<Country isoCountryCode="DE"/>
</PostalAddress>
</Contact>
</InvoicePartner>
<InvoicePartner>
<Contact role="from">
<Name xml:lang="fr">Supplier GmbH</Name>
<PostalAddress>
<Street>Street</Street>
<City>Berlin</City>
<PostalCode>12344</PostalCode>
<Country isoCountryCode="DE">Germany</Country>
</PostalAddress>
<Extrinsic name="LegalStatus">ABC</Extrinsic>
<Extrinsic name="LegalCapital">
<Money currency="EUR">12345678.90</Money>
</Extrinsic>
</Contact>
</InvoicePartner>
<InvoicePartner>
<Contact role="soldTo">
<Name xml:lang="fr">ABC International LLC</Name>
<PostalAddress>
<Street>100 Street Rd</Street>
<City>New York</City>
<State>NY</State>
<PostalCode>19087</PostalCode>
<Country isoCountryCode="US">United States</Country>
</PostalAddress>
</Contact>
</InvoicePartner>
<InvoiceDetailShipping>
<Contact role="shipFrom">
<Name xml:lang="fr">Supplier GmbH</Name>
<PostalAddress>
<Street>Street 1</Street>
<City>Berlin</City>
<PostalCode>12455</PostalCode>
<Country isoCountryCode="DE">Germany</Country>
</PostalAddress>
</Contact>
<Contact role="shipTo">
<Name xml:lang="de">ABC International GmbH</Name>
<PostalAddress>
<DeliverTo>Dock 1</DeliverTo>
<Street>Str. 28</Street>
<City>Berlin</City>
<PostalCode>12345</PostalCode>
<Country isoCountryCode="DE"/>
</PostalAddress>
</Contact>
</InvoiceDetailShipping>
<InvoiceDetailPaymentTerm payInNumberOfDays="30" percentageRate="0"/>
<Comments>Header Comments</Comments>
<Extrinsic name="paymentTerms">15 days 4%, 90 days net</Extrinsic>
<Extrinsic name="buyerVatID">DE11111111</Extrinsic>
<Extrinsic name="supplierVatID">DE22222222</Extrinsic>
</InvoiceDetailRequestHeader>
<InvoiceDetailOrder>
<InvoiceDetailOrderInfo>
<OrderReference orderID="12345">
<DocumentReference payloadID="123"/>
</OrderReference>
</InvoiceDetailOrderInfo>
<InvoiceDetailItem invoiceLineNumber="1" quantity="5">
<UnitOfMeasure>EA</UnitOfMeasure>
<UnitPrice>
<Money currency="EUR">34.72</Money>
</UnitPrice>
<PriceBasisQuantity conversionFactor="1" quantity="1">
<UnitOfMeasure>EA</UnitOfMeasure>
<Description xml:lang="fr">5 * 34,72 EUR / Each</Description>
</PriceBasisQuantity>
<InvoiceDetailItemReference lineNumber="10">
<ItemID>
<SupplierPartID>111</SupplierPartID>
<BuyerPartID>00000000000111</BuyerPartID>
</ItemID>
<Description xml:lang="de">500ML Lotion</Description>
</InvoiceDetailItemReference>
<SubtotalAmount>
<Money currency="EUR">173.60</Money>
</SubtotalAmount>
<Tax>
<Money currency="EUR">12.15</Money>
<Description xml:lang="fr"/>
<TaxDetail
category="vat"
percentageRate="7"
taxPointDate="2021-05-03T00:00:00+02:00">
<TaxableAmount>
<Money currency="EUR">173.60</Money>
</TaxableAmount>
<TaxAmount>
<Money currency="EUR">12.15</Money>
</TaxAmount>
<Description xml:lang="fr">Reduced VAT</Description>
</TaxDetail>
</Tax>
<GrossAmount>
<Money currency="EUR">185.75</Money>
</GrossAmount>
<TotalAmountWithoutTax>
<Money currency="EUR">173.60</Money>
</TotalAmountWithoutTax>
<NetAmount>
<Money currency="EUR">185.75</Money>
</NetAmount>
</InvoiceDetailItem>
<InvoiceDetailItem invoiceLineNumber="2" quantity="3">
<UnitOfMeasure>EA</UnitOfMeasure>
<UnitPrice>
<Money currency="EUR">51.82</Money>
</UnitPrice>
<PriceBasisQuantity conversionFactor="1" quantity="1">
<UnitOfMeasure>EA</UnitOfMeasure>
<Description xml:lang="fr">3 * 51,82 EUR / Each</Description>
</PriceBasisQuantity>
<InvoiceDetailItemReference lineNumber="20">
<ItemID>
<SupplierPartID>222</SupplierPartID>
<BuyerPartID>00000000000222</BuyerPartID>
</ItemID>
<Description xml:lang="de">2000ML Hand wash</Description>
</InvoiceDetailItemReference>
<SubtotalAmount>
<Money currency="EUR">155.46</Money>
</SubtotalAmount>
<Tax>
<Money currency="EUR">10.88</Money>
<Description xml:lang="fr"/>
<TaxDetail
category="vat"
percentageRate="7"
taxPointDate="2021-05-03T00:00:00+02:00">
<TaxableAmount>
<Money currency="EUR">155.46</Money>
</TaxableAmount>
<TaxAmount>
<Money currency="EUR">10.88</Money>
</TaxAmount>
<Description xml:lang="fr">Reduced VAT</Description>
</TaxDetail>
</Tax>
<GrossAmount>
<Money currency="EUR">166.34</Money>
</GrossAmount>
<TotalAmountWithoutTax>
<Money currency="EUR">155.46</Money>
</TotalAmountWithoutTax>
<NetAmount>
<Money currency="EUR">166.34</Money>
</NetAmount>
</InvoiceDetailItem>
<InvoiceDetailItem invoiceLineNumber="3" quantity="2">
<UnitOfMeasure>EA</UnitOfMeasure>
<UnitPrice>
<Money currency="EUR">44.30</Money>
</UnitPrice>
<PriceBasisQuantity conversionFactor="1" quantity="1">
<UnitOfMeasure>EA</UnitOfMeasure>
<Description xml:lang="fr">2 * 44,3 EUR / Each</Description>
</PriceBasisQuantity>
<InvoiceDetailItemReference lineNumber="30">
<ItemID>
<SupplierPartID>333</SupplierPartID>
<BuyerPartID>00000000000333</BuyerPartID>
</ItemID>
<Description xml:lang="de">1000ML Hand sanitizer</Description>
</InvoiceDetailItemReference>
<SubtotalAmount>
<Money currency="EUR">88.60</Money>
</SubtotalAmount>
<Tax>
<Money currency="EUR">16.83</Money>
<Description xml:lang="fr"/>
<TaxDetail
category="vat"
percentageRate="19"
taxPointDate="2021-05-03T00:00:00+02:00">
<TaxableAmount>
<Money currency="EUR">88.60</Money>
</TaxableAmount>
<TaxAmount>
<Money currency="EUR">16.83</Money>
</TaxAmount>
<Description xml:lang="fr">DE to ABC DE</Description>
</TaxDetail>
</Tax>
<GrossAmount>
<Money currency="EUR">105.43</Money>
</GrossAmount>
<TotalAmountWithoutTax>
<Money currency="EUR">88.60</Money>
</TotalAmountWithoutTax>
<NetAmount>
<Money currency="EUR">105.43</Money>
</NetAmount>
</InvoiceDetailItem>
<InvoiceDetailItem invoiceLineNumber="4" quantity="6">
<UnitOfMeasure>EA</UnitOfMeasure>
<UnitPrice>
<Money currency="EUR">28.69</Money>
</UnitPrice>
<PriceBasisQuantity conversionFactor="1" quantity="1">
<UnitOfMeasure>EA</UnitOfMeasure>
<Description xml:lang="fr">6 * 28,69 EUR / Each</Description>
</PriceBasisQuantity>
<InvoiceDetailItemReference lineNumber="40">
<ItemID>
<SupplierPartID>444</SupplierPartID>
<BuyerPartID>00000000000444</BuyerPartID>
</ItemID>
<Description xml:lang="de">10ML Balm</Description>
</InvoiceDetailItemReference>
<SubtotalAmount>
<Money currency="EUR">172.14</Money>
</SubtotalAmount>
<Tax>
<Money currency="EUR">32.71</Money>
<Description xml:lang="fr"/>
<TaxDetail
category="vat"
percentageRate="19"
taxPointDate="2021-05-03T00:00:00+02:00">
<TaxableAmount>
<Money currency="EUR">172.14</Money>
</TaxableAmount>
<TaxAmount>
<Money currency="EUR">32.71</Money>
</TaxAmount>
<Description xml:lang="fr">DE to ABC DE</Description>
</TaxDetail>
</Tax>
<GrossAmount>
<Money currency="EUR">204.85</Money>
</GrossAmount>
<TotalAmountWithoutTax>
<Money currency="EUR">172.14</Money>
</TotalAmountWithoutTax>
<NetAmount>
<Money currency="EUR">204.85</Money>
</NetAmount>
</InvoiceDetailItem>
</InvoiceDetailOrder>
<InvoiceDetailSummary>
<SubtotalAmount>
<Money currency="EUR">589.80</Money>
</SubtotalAmount>
<Tax>
<Money currency="EUR">96.32</Money>
<Description xml:lang="fr"/>
<TaxDetail
category="vat"
percentageRate="7"
taxPointDate="2021-05-03T00:00:00+02:00">
<TaxableAmount>
<Money currency="EUR">329.06</Money>
</TaxableAmount>
<TaxAmount>
<Money currency="EUR">23.03</Money>
</TaxAmount>
<Description xml:lang="fr">Reduced VAT</Description>
</TaxDetail>
<TaxDetail
category="vat"
percentageRate="19"
taxPointDate="2021-05-03T00:00:00+02:00">
<TaxableAmount>
<Money currency="EUR">385.74</Money>
</TaxableAmount>
<TaxAmount>
<Money currency="EUR">73.29</Money>
</TaxAmount>
<Description xml:lang="fr">DE to ABC DE</Description>
</TaxDetail>
</Tax>
<SpecialHandlingAmount>
<Money currency="SEK">25.00</Money>
<Description xml:lang="en-GB">Warehousing</Description>
</SpecialHandlingAmount>
<ShippingAmount>
<Money currency="SEK">100.00</Money>
</ShippingAmount>
<GrossAmount>
<Money currency="EUR">811.12</Money>
</GrossAmount>
<TotalCharges>
<Money currency="EUR">125.00</Money>
</TotalCharges>
<TotalAmountWithoutTax>
<Money currency="EUR">714.80</Money>
</TotalAmountWithoutTax>
<NetAmount>
<Money currency="EUR">811.12</Money>
</NetAmount>
<DueAmount>
<Money currency="EUR">811.12</Money>
</DueAmount>
</InvoiceDetailSummary>
</InvoiceDetailRequest>
</Request>
</cXML>
6.6. Invoice status update
The “Invoice Status Update” (also known as as "application response" or "invoice response") described on page 383-384 in the cXML Reference guide is supported by Pagero, but as its own, separate document. As such, it is not in scope of the invoice/credit note chapter of this integration guide.
Please contact your account manager for more information if you’re interested in sending/receiving this document type.
7. Credit Note
Relevant chapter in the cXML Reference guide:
-
Invoices, pages 342-398
7.1. Line level credit example
Used when crediting only parts of an invoice.
Amounts must be negative.
Example
Credit note example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.049/InvoiceDetail.dtd">
<cXML
payloadID="1234567890"
timestamp="2021-03-12T14:49:57-05:00">
<Header>
<!-- ... -->
</Header>
<Request deploymentMode="test">
<InvoiceDetailRequest>
<InvoiceDetailRequestHeader
invoiceDate="2021-03-12T14:49:57-05:00"
invoiceID="12345"
invoiceOrigin="supplier"
operation="new"
purpose="lineLevelCreditMemo"> (1)
<!-- ... -->
<InvoiceDetailOrder>
<InvoiceDetailItem
invoiceLineNumber="1"
quantity="1"
reason="return"> (2)
<!-- ... -->
</InvoiceDetailItem>
</InvoiceDetailOrder>
<!-- ... -->
</InvoiceDetailRequestHeader>
</InvoiceDetailRequest>
</Request>
</cXML>
Please note:
1 | InvoiceDetailRequestHeader/@purpose and its value lineLevelCreditMemo . |
2 | InvoiceDetailItem/@reason and its value return . |
7.2. Header level credit note
Used when crediting an invoice in full.
Amounts must be negative.
Example
Credit note example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/InvoiceDetail.dtd">
<cXML
payloadID="1234567890"
timestamp="2021-03-12T10:28:13.000Z">
<Header>
<From>
<Credential domain="NetworkID">
<Identity>11111</Identity>
</Credential>
</From>
<To>
<Credential domain="NetworkID">
<Identity>22222</Identity>
</Credential>
</To>
<Sender>
<Credential domain="NetworkID">
<Identity>11111</Identity>
<SharedSecret>ABC</SharedSecret>
</Credential>
<UserAgent>Sending system</UserAgent>
</Sender>
</Header>
<Request deploymentMode="test">
<InvoiceDetailRequest>
<InvoiceDetailRequestHeader
invoiceDate="2021-03-12T00:00:00+02:00"
invoiceID="12345"
operation="new"
purpose="creditMemo">(1)
<InvoiceDetailHeaderIndicator/>
<InvoiceDetailLineIndicator/>
<InvoicePartner>
<Contact role="from">
<Name xml:lang="no-NO">Company AS</Name>
<PostalAddress>
<DeliverTo>North Dock 1</DeliverTo>
<Street>Lilleveien 12</Street>
<City>Oslo</City>
<PostalCode>0283</PostalCode>
<Country isoCountryCode="NO">NO</Country>
</PostalAddress>
<Email>conferences@npf.no</Email>
</Contact>
<IdReference domain="accountID" identifier="1234554321">
<Creator xml:lang="no-NO"/>
</IdReference>
<IdReference domain="vatID" identifier="NO999111222MVA"/>
</InvoicePartner>
<InvoicePartner>
<Contact addressID="123" role="soldTo">
<Name xml:lang="no-NO">Buying Company AS</Name>
<PostalAddress>
<DeliverTo>Buying Company AS</DeliverTo>
<Street>Postboks 2015</Street>
<City>Oslo</City>
<PostalCode>0998</PostalCode>
<Country isoCountryCode="NO">NO</Country>
</PostalAddress>
</Contact>
</InvoicePartner>
<InvoicePartner>
<Contact addressID="123" role="billTo">
<Name xml:lang="no-NO">Buying Company AS</Name>
<PostalAddress>
<DeliverTo>Buying Company AS</DeliverTo>
<Street>Postboks 2015</Street>
<City>Oslo</City>
<PostalCode>0998</PostalCode>
<Country isoCountryCode="NO">NO</Country>
</PostalAddress>
</Contact>
</InvoicePartner>
<InvoicePartner>
<Contact role="remitTo">
<Name xml:lang="no-NO">Selling company AS</Name>
<PostalAddress>
<Street>Lilleveien 123</Street>
<City>Oslo</City>
<PostalCode>0283</PostalCode>
<Country isoCountryCode="NO">NO</Country>
</PostalAddress>
<Email>ab@cd.no</Email>
</Contact>
<IdReference domain="accountID" identifier="1234567890">
<Creator xml:lang="no-NO"/>
</IdReference>
<IdReference domain="vatID" identifier="NO999888777MVA"/>
<IdReference domain="supplierTaxID" identifier="NO999888777MVA"/>
</InvoicePartner>
<InvoiceIDInfo invoiceID="54321"/>
<InvoiceDetailShipping shippingDate="2021-03-12">
<Contact role="shipTo">
<Name xml:lang="no-NO">Ship to company AS</Name>
<PostalAddress>
<Street>Postboks 123</Street>
<City>Oslo</City>
<PostalCode>0209</PostalCode>
<Country isoCountryCode="NO">NO</Country>
</PostalAddress>
</Contact>
<Contact role="shipFrom">
<Name xml:lang="no-NO">Company AS</Name>
</Contact>
</InvoiceDetailShipping>
<Comments>Invoice reference: 54321</Comments>
<Extrinsic name="Invoice description 1">Credit note 12345</Extrinsic>
<Extrinsic name="buyerVatID">NO999888777MVA</Extrinsic>
<Extrinsic name="supplierVatID">NO999111222MVA</Extrinsic>
</InvoiceDetailRequestHeader>
<InvoiceDetailOrder>
<InvoiceDetailOrderInfo>
<OrderIDInfo orderID="1234"/>
</InvoiceDetailOrderInfo>
<InvoiceDetailItem invoiceLineNumber="1" quantity="-1">
<UnitOfMeasure>NAR</UnitOfMeasure>
<UnitPrice>
<Money currency="NOK">1000.00</Money>
</UnitPrice>
<InvoiceDetailItemReference lineNumber="987">
<ItemID>
<SupplierPartID>12345</SupplierPartID>
</ItemID>
<Description xml:lang="no-NO">12 months membership for employee</Description>
</InvoiceDetailItemReference>
<SubtotalAmount>
<Money currency="NOK">-1000.00</Money>
</SubtotalAmount>
<Comments/>
</InvoiceDetailItem>
</InvoiceDetailOrder>
<InvoiceDetailSummary>
<SubtotalAmount>
<Money currency="NOK">-1000.00</Money>
</SubtotalAmount>
<Tax>
<Money currency="NOK">0.00</Money>
<Description xml:lang="no-NO">VAT</Description>
<TaxDetail
category="vat"
exemptDetail="exempt"
percentageRate="0.00"
purpose="tax"
taxPointDate="2021-03-12T00:00:00+02:00">
<TaxableAmount>
<Money currency="NOK">-1000.00</Money>
</TaxableAmount>
<TaxAmount>
<Money currency="NOK">0.00</Money>
</TaxAmount>
<Description xml:lang="no-NO">Without charges</Description>
</TaxDetail>
</Tax>
<GrossAmount>
<Money currency="NOK">-1000.00</Money>
</GrossAmount>
<NetAmount>
<Money currency="NOK">-1000.00</Money>
</NetAmount>
<DueAmount>
<Money currency="NOK">-1000.00</Money>
</DueAmount>
</InvoiceDetailSummary>
</InvoiceDetailRequest>
</Request>
</cXML>
Please note:
1 | InvoiceDetailRequestHeader/@purpose and its value creditMemo . |
8. XML schemas
8.1. DTD
-
Invoice: http://xml.cxml.org/schemas/cXML/1.2.049/InvoiceDetail.dtd
-
Credit note: http://xml.cxml.org/schemas/cXML/1.2.049/InvoiceDetail.dtd
-
Order response: http://xml.cxml.org/schemas/cXML/1.2.049/Fulfill.dtd
-
Despatch advice/ASN: http://xml.cxml.org/schemas/cXML/1.2.049/Fulfill.dtd
8.2. XSD
Note: all XSD’s have been converted from the official DTD’s by Pagero.
-
Order: cXML.zip
-
Order response: Fulfill.zip
-
Despatch advice/ASN: Fulfill.zip
-
Invoice: InvoiceDetail.zip
-
Credit note: InvoiceDetail.zip
9. Validation
9.1. Validation principles
When validating the syntax of files against the cXML 1.2.049 schemas (DTD or XSD), the following is checked:
-
All element names and attributes must be correctly written and follow the cXML 1.2.049 schema.
-
All cXML 1.2.049 mandatory element names must be present.
-
All element’s contents must be according to the element’s type definition.
Pagero validate all inbound and outbount files. Invalid files run the risk of being stopped in processing in our platform.
9.2. Validation service/tool
Pagero offers a free online format validation tool, found here:
A free user account is required.
In addition, most XML software offer ways of validating XML files against XML schemas.
11. Support
If you have any questions related to this integration guide, please create a support ticket via Pagero Support.
We gladly welcome any general feedback, suggestions, additions, corrections etc. as well.