## Contract-financing

# 3. Contract billing

#

This is a technical overview of the ContractBilling file (XML) to be sent to PayEx upon billing of customer contracts. The file contains detailed billing instructions for each customer contract that should be billed.

Please note that your Response files might only utilize and/or contain a subset of all elements described below. See the XSD version for your response files to learn more.

## Overview

The Contract billing file contains all customers and contracts that is to billed.

For each contract, the total amount to bill must be stated including a specification of all the products that is part of the bill/amount.
In addition to the billing instructions, the customer's address should always be included in this file.

Below diagram shows the structure of ContractBilling in current version

##

## Name convention

ContractBilling_<CompanyNumber>_<DateTime>_<SerialNumber>.xml

Names Component | Description
--- | ---
CompanyNumber | The company number in our ledger system
DateTime | Date created, Should be in the format ISO 8601 format, YYYYMMDDThhmmdd
SerialNumber | Should follow an uninterupted number series, 00001, and so on.

## Download current XML schema file

Fileversion | Version | Releasedate | Comment
--- | --- | --- | ---
ContractBilling_[1.0].xsd | 1.0 | 2018-04-01 | Initial version
ContractBilling_[1.1].xsd | 1.1 | 2021-10-11 | Added support for RecurringCard
ContractBilling_[1.2].xsd | 1.2 | 2022-04-05 | Added support for OffContract. Added distributionType that alters the default distribution for the billing instruction
ContractBilling_[1.3].xsd | 1.3 | 2022-04-26 | Added support for new eCurrencyTypes USD and GBP
ContractBilling_[1.4].xsd | 1.4 | 2022-10-18 | Updated length of CoAddress and StreetAddress. Extended PXNameAddressString to include diacritics.
ContractBilling_[1.X].xsd | 1.5 | 2024-05-07 | Added support for BillingByPayEx

## ChangeLog

#### Version 1.0

##### April, 2018

ContractBilling_[1.0].xsd

Initial version

#### Version 1.1

##### October, 2021

ContractBilling_[1.1].xsd

Added support for RecurringCard
Optional elements BillingInfo > PaymentInfo > Clear / Set > Card

####

#### Version 1.2

##### April, 2022

ContractBilling_[1.2].xsd

Added support for OffContract.
Added DistributionType that alters the default distribution for the billing instruction

#### Version 1.3

##### April, 2022

ContractBilling_[1.3].xsd

Added support for new eCurrencyTypes USD and GBP

#### Version 1.4

##### October, 2022

ContractBilling_[1.4].xsd

Updated length of CoAddress and StreetAddress. Extended PXNameAddressString to include diacritics.

####

#### Version 1.5 (Latest)

##### Mars, 2024

ContractBilling_[1.X].xsd

Added support for BillingByPayEx to make it possible for PayEx to take over the claim process for contracts. Billing instructions (BillInfo) will be executed before BillingByPayEx. BillingByPayEx 'set' is meant to be sent together with the last billing instruction in the same file. If BillingByPayEx 'clear' is sent, a new billing instruction cannot be included in the same file, it must be sent with the following file.

Tags: px-custom-page-content
Created by David Persson on 2020/06/25 22:35