MDXI XML
MDXI XML | Overview |
---|---|
Description | Merchant Data Exchange Interface |
Version | 3 |
Schema location | https://www.mpay24.com/schemas/MDXI/v3.0/MDXI.xsd |
The MDXI XML describes the payment order and how the mPAY24 PayPage is constructed. It defines the shown shopping cart and the usable payment systems for the customer.
Information stated within the MDXI are passed to the financial institution, if possible. Therefore, it is recommended to provide all available information.
Customization and examples
The mPAY24 PayPage can be adjusted by setting attributes within the MDXI. Attributes defining styles have the surfix Style
in their name.
Center mPAY24 PayPage
To center the mPAY24 PayPage in the browser’s display area set the Style
attribute within the Order
element to the following:
<?xml version="1.0" encoding="UTF-8"?>
<Order Style="margin-left: auto; margin-right: auto;">
<Tid>826241</Tid>
<Price>1.00</Price>
</Order>
Alternating item rows
To create alternating item rows the Style
attribute has to be set for each sub element of each Item
.
<?xml version="1.0" encoding="UTF-8"?>
<Order>
<Tid>13548293</Tid>
<ShoppingCart>
<Item>
<Description Style="background-color:lightgray">Desc A</Description>
<Quantity Style="background-color:lightgray">1</Quantity>
<ItemPrice Style="background-color:lightgray">7.50</ItemPrice>
<Price Style="background-color:lightgray">7.50</Price>
</Item>
<Item>
<Description Style="background-color:gray">Desc B</Description>
<Quantity Style="background-color:gray">3</Quantity>
<ItemPrice Style="background-color:gray">2.50</ItemPrice>
<Price Style="background-color:gray">7.50</Price>
</Item>
<Item>
<Description Style="background-color:lightgray">Desc C</Description>
<Quantity Style="background-color:lightgray">4</Quantity>
<ItemPrice Style="background-color:lightgray">4.25</ItemPrice>
<Price Style="background-color:lightgray">17.00</Price>
</Item>
</ShoppingCart>
<Price>32.00</Price>
</Order>
Preselecting payment type
To preselect a payment type/system, the element PaymentTypes
should be used. It can either whitelist (set Enable="true"
) or blacklist (set Enable="false"
) payment types/systems.
If predefining of payment systems is unnecessary, mPAY24 recommends to not use this element, in order to be able to use further activated payment systems immediately.
<?xml version="1.0" encoding="UTF-8"?>
<Order>
<Tid>267351</Tid>
<PaymentTypes Enable="true">
<Payment Type="EPS"/>
</PaymentTypes>
<Price>1.00</Price>
</Order>
Stating tax amounts
Please be aware that mPAY24 does not calculate any net or gross amounts as they have to be provided within the ShoppingCart
element. All amounts have to be stated absolutely and not percentaged.
mPAY24 does not notice the merchant if the sum of the shopping cart and the total sum are not equal. When the sums are different, the shopping cart will be discard and only the Price
element is transmitted to the financial institution.
Net prices
If the shopping cart should contain only net prices, the elements ItemPrice
have to be defined with net amounts. The attribute Tax
should not be set.
The element Tax
holds the absolute value of the incurred tax of the total amount.
Therefore, the total amount of the order (element Price
of Order
) is made up from each Price
element within an Item
and the Price
element itself.
<?xml version="1.0" encoding="UTF-8"?>
<Order>
<Tid>Order excl. Tax</Tid>
<ShoppingCart>
<Item>
<Number>1</Number>
<Quantity>1</Quantity>
<ItemPrice>1.00</ItemPrice>
</Item>
<Item>
<Number>2</Number>
<Quantity>2</Quantity>
<ItemPrice>2.00</ItemPrice>
</Item>
<ShippingCosts>3.00</ShippingCosts>
<Tax>1.60</Tax>
</ShoppingCart>
<Price>9.60</Price>
</Order>
The total amount of the shopping cart in the Price
element are calculated as followed:
Price = SUM(Quantity x ItemPrice) + SUM(Discount) + SUM(ShippingCost) + Tax
Gross prices
If the shopping cart should contain only gross prices, the element ItemPrice
has to be defined with gross amounts. The attribute Tax
has to be set to the absolute value of the incurred tax within the ItemPrice
element.
The element Tax
holds the absolute value of the incurred tax of the total amount.
The total amount of the order (element Price
) is made up only from each Price
element and optional from the Tax
attribute of ShippingCosts
, since these prices already include the tax. Additional the tax will be displayed with the abbr. incl.
prefix on the mPAY24 PayPage, if no header was set (via the Header
attribute).
<?xml version="1.0" encoding="UTF-8"?>
<Order>
<Tid>Order incl. Tax</Tid>
<ShoppingCart>
<Item>
<Number>1</Number>
<Quantity>1</Quantity>
<ItemPrice Tax="0.20">1.20</ItemPrice>
</Item>
<Item>
<Number>2</Number>
<Quantity>2</Quantity>
<ItemPrice Tax="0.40">2.40</ItemPrice>
</Item>
<ShippingCosts Tax="0.60">3.60</ShippingCosts>
<Tax>1.60</Tax>
</ShoppingCart>
<Price>9.60</Price>
</Order>
The total amount of the shopping cart in the Price
element are calculated as followed:
Price = SUM(Quantity x ItemPrice) + SUM(Discount) + SUM(ShippingCost)
The total tax of the shopping cart in the Tax
element are calculated as followed:
Tax = SUM(Quantity x Tax of ItemPrice) + SUM(Tax of ShippingCosts)`
Schema description
The encoding of the MDXI XML is either UTF-8
or ISO-8859-1
.
Order
The Order
element is used for the SelectPayment
operation to describe order details (such as order number, shopping cart, amount, ...) and/or customer details (name, address, ...).
Element | Type | Restriction | Description |
---|---|---|---|
ClientIP | string | [0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} maxLength: 15 | Customer client IP address |
UserField | string | Length: 0 - 255 | User variable (is communicated over the URLs) |
Tid | string | Length: 1 - 32 | Unique transaction ID assigned by the merchant |
TemplateSet | TemplateSet | WEB | Template set definition |
PaymentTypes | PaymentTypes | - | Payment type restriction |
PaymentProfiles | PaymentProfiles | - | Payment profile restriction |
ShoppingCart | ShoppingCart | - | Shopping cart of the order |
Price | float | 2 decimal places | Total amount of the order |
Currency | string | Length: 3 | Currency of the order |
Customer | string | Length: 0 - 50 | Customer name |
BillingAddr | AddressType | - | Customer billing address |
ShippingAddr | AddressType | - | Customer shipping address |
URL | URLType | - | URLs for redirection and notification |
If ShippingAddr
is not set, the same values as for BillingAddr
are assumed for the shipping address.
Profile
The Profile
element is used only by CreateProfile
.
Element | Type | Restriction | Description |
---|---|---|---|
ClientIP | string | Length: 0 - 15 | Customer client IP address |
TemplateSet | enumeration | WEB | Template set definition |
PaymentTypes | PaymentTypes | - | Payment type restriction |
CustomerID | string | Length: 1 - 32 | Customer ID assigned by the merchant |
BillingAddr | AddressType | - | Customer billing address |
URL | URLType | - | URLs for redirection and notification |
Special types
TemplateSet
Attribute | Type | Restriction | Description |
---|---|---|---|
CSSName | enumeration | DEFAULT , MOBILE , MODERN | CSS template name |
Language | enumeration | EN , DE , BG , FR , HU , NL , ES , IT , CS , HR , SK , SL , SR , RO , RU , PL , PT , TR , ZH , JA , DA , FI , SV , NO , UK , EL | Language of the mPAY24 PayPage |
PaymentTypes
The element PaymentTypes
could be used if payment systems are to be excluded for selection by the customer. For example due to currency restrictions, payment type preselections, disabling or enabling payment methods on a per billing address country basis, ...
Attribute | Type | Restriction | Description |
---|---|---|---|
Enable | enumeration | true , false | Enables or disables the specified payment types |
If only payment systems not available to the merchant are enabled or all payment systems available to the merchant are disabled, the mPAY24 PayPage shows an error message upon opening.
If predefining of payment systems is unnecessary, mPAY24 recommends to not use this element, in order to use future activated payment systems immediately.
Elements | Type | Restriction | Description |
---|---|---|---|
Payment | Payment | - | Specifies a payment type with brand |
Payment
Attribute | Type | Restriction | Description |
---|---|---|---|
Type | enumeration | CC , MAESTRO , EPS , PB , PSC , ELV , QUICK , GIROPAY , PAYPAL , MPASS , BILLPAY , INVOICE , HP , KLARNA , SOFORT | Payment type abbreviation (if only Type is given, all brands of this type are affected) |
Brand | enumeration | AMEX , DINERS , MASTERCARD , VISA , JCB , ATOS , HOBEX-AT , HOBEX-DE , HOBEX-NL , INVOICE , HP | Brand abbreviation (Only for type CC , ELV , BILLPAY and KLARNA ) |
SubBrand | integer | Length: 0 - 3 | Sub brand abbreviation/id (currently only used for Type = EPS as bank id) |
PaymentProfiles
The element PaymentProfiles
can be used in combination with the interactive profiles to include or exclude payment profiles of the customer for a transaction. Also it can be used to define the order in which profiles are displayed to the customer.
Attribute | Type | Restriction | Description |
---|---|---|---|
Enable | enumeration | true , false | Enables or disables the payment profile |
Elements | Type | Restriction | Description |
---|---|---|---|
ProfileID | string | Length: 1 - 12 | Enable or disable specified customer payment profiles |
ShoppingCart
Attribute | Type | Restriction | Description |
---|---|---|---|
Header | string | Length: 0 - 255 | Sets the header text |
HeaderStyle | string | Length: 0 - 255 | Sets the header style |
Style | string | Length: 0 - 255 | Sets the element style |
CaptionStyle | string | Length: 0 - 255 | Sets the caption style |
NumberHeader | string | Length: 0 - 255 | Sets the Number header text |
NumberStyle | string | Length: 0 - 255 | Sets the Number header style |
ProductNrHeader | string | Length: 0 - 255 | Sets the ProductNr header text |
ProductNrStyle | string | Length: 0 - 255 | Sets the ProductNr header style |
DescriptionHeader | string | Length: 0 - 255 | Sets the Description header text |
DescriptionStyle | string | Length: 0 - 255 | Sets the Description header style |
PackageHeader | string | Length: 0 - 255 | Sets the Package header text |
PackageStyle | string | Length: 0 - 255 | Sets the Package header style |
QuantityHeader | string | Length: 0 - 255 | Sets the Quantity header text |
QuantityStyle | string | Length: 0 - 255 | Sets the Quantity header style |
ItemPriceHeader | string | Length: 0 - 255 | Sets the ItemPrice header text |
ItemPriceStyle | string | Length: 0 - 255 | Sets the ItemPrice header style |
PriceHeader | string | Length: 0 - 255 | Sets the Price header text |
PriceStyle | string | Length: 0 - 255 | Sets the Price header style |
If attributes are used to define an alternative text, this text is fixed and is not affected by any language setting.
Element | Type | Restriction | Description |
---|---|---|---|
Description | string | Length: 0 - 255 | Order description (shown above the shopping cart) |
Item | Item | - | Items of the shopping cart |
SubTotal | float | 2 decimal places | Sub total for displaying |
Discount | float | 2 decimal places | Discount of total amount as negative number |
ShippingCosts | float | 2 decimal places | Shipping costs |
Tax | float | 2 decimal places | Total tax of the order |
The elements Discount
and ShippingCosts
can occur multiple times with or without tax.
Item
Element | Type | Restriction | Description |
---|---|---|---|
Number | string | Length: 0 - 255 | Number of shopping cart row |
ProductNr | string | Length: 0 - 255 | Product number of the item |
Description | string | Length: 0 - 255 | Item description resp. title |
Package | string | Length: 0 - 255 | Scale size of the item |
Quantity | string | Length: 0 - 255 | Quantity of the item ordered |
ItemPrice | string | Length: 0 - 255 | Amount of a single unit |
Price | string | Length: 0 - 255 | Total amount of all units |
The total in Price
is automatically calculated (by multiply Quantity
with ItemPrice
) if Quantity
and ItemPrice
is provided. Quantity
is assumed to be 1
if not provided. If Price
and Quantity
is given as well as Quantity
is other than 1
, the Price
element is discarded.
It is recommended to provide the
Price
only to represent potential intended rounding ups.
The elements Number
, ProductNr
, Description
, Package
, Quantity
, ItemPrice
and Price
have the following attribute:
Attribute | Type | Restriction | Description |
---|---|---|---|
Style | string | Length: 0 - 255 | Sets a value style |
SubTotal, Discount
Attribute | Type | Restriction | Description |
---|---|---|---|
Header | string | Length: 0 - 255 | Sets a fixed label text |
HeaderStyle | string | Length: 0 - 255 | Sets a label style |
Style | string | Length: 0 - 255 | Sets a value style |
ShippingCosts
Attribute | Type | Restriction | Description |
---|---|---|---|
Header | string | Length: 0 - 255 | Sets a fixed label text |
HeaderStyle | string | Length: 0 - 255 | Sets a label style |
Style | string | Length: 0 - 255 | Sets a value style |
Tax | float | 2 decimal places | Total amount of incurrent tax |
Tax
Attribute | Type | Restriction | Description |
---|---|---|---|
Header | string | Length: 0 - 255 | Sets a fixed label text |
HeaderStyle | string | Length: 0 - 255 | Sets a label style |
Style | string | Length: 0 - 255 | Sets a value style |
Percent | string | Length: 1 - 6 | Sets the Tax header to <Percent>% Ust. or inkl. <Percent>% Ust. (if Header and HeaderStyle is not set) |
Currency
Attribute | Type | Restriction | Description |
---|---|---|---|
Display | string | Length: 0 - 50 | Alt. value for currency code |
Customer
Attribute | Type | Restriction | Description |
---|---|---|---|
Id | string | Length: 1 - 32 | Customer ID assigned by the merchant |
UseProfile | boolean | true , false | Enables or disables profile usage/storage |
AddressType
The AddressType
type is for all customer address definitions.
The AddressType
requires at least the Name
. If either Street
, Zip
, City
or Country
is specified, the other elements (Street
, Zip
, City
, Country
) are also mandatory to specify. The elements Street2
, State
, Email
and Phone
are always optional.
Please note, the element Email
is not shown on the mPAY24 PayPage.
Attribute | Type | Restriction | Description |
---|---|---|---|
Gender | enumeration | F , M | Customer gender |
Birthday | date | Format: YYYY-MM-DD | Customer birthday |
Element | Type | Restriction | Description |
---|---|---|---|
Name | string | Length: 1 - 50 | Customer name |
FirstName | string | - | Deprecated, use Name instead |
LastName | string | - | Deprecated, use Name instead |
Street | string | Length: 0 - 50 | First street line |
Street2 | string | Length: 0 - 50 | Second street line |
Zip | string | Length: 0 - 50 | Zip code |
City | string | Length: 0 - 50 | City name |
State | string | Length: 0 - 40 | State name |
Country | string | Length: 0 - 50 | Country name |
string | Length: 1 - 64 | Customer e-mail address | |
Phone | string | Length: 1 - 20 | Customer phone number |
Country
Attribute | Type | Restriction | Description |
---|---|---|---|
Code | string | Length: 2 | Two digit ISO county code |
URLType
Element | Type | Restriction | Description |
---|---|---|---|
Success | anyURI | Length: 5 - 2040 | URL for customer redirection incase of success |
Error | anyURI | Length: 5 - 2040 | URL for customer redirection incase of error |
Confirmation | anyURI | Length: 5 - 2040 | URL for receiving push notificationsabout the transaction state |
Cancel | anyURI | Length: 5 - 2040 | URL for customer redirection incase of abortion |
All URL values need to start with http://
or https://
.
Updated over 2 years ago