---
Title: Order Payments XML
Language: cs-CZ
Canonical URL to this Markdown version of this page: [https://docs.kvik.shop/cs/xml2db-api/order-payments-xml.md](https://docs.kvik.shop/cs/xml2db-api/order-payments-xml.md)
Canonical URL to HTML version of this page (for humans): [https://docs.kvik.shop/cs/xml2db-api/order-payments-xml](https://docs.kvik.shop/cs/xml2db-api/order-payments-xml)
---

# Order Payments XML

Breadcrumb: [XML2DB API](https://docs.kvik.shop/cs/xml2db-api.md) > [Order Payments XML](https://docs.kvik.shop/cs/xml2db-api/order-payments-xml.md)



# Order Payments XML

## Example

```
<?xml version="1.0" encoding="UTF-8"?>
<order uuid="453f0169-fee6-4a76-b55a-ebe8b8a0da9f" code="12345" variableNumber="12345" invoiceNumber="202012345" originName="heurekaCartSk" originCode="98765" originStatusId="1">
    <payments>
        <payment methodName="heurekaCartOnline" customCode="98765432109876" linkCustomCode="987" externalNumber="9876543" externalState="1" priceAmount="89" currency="EUR"/>
    </payments>
</order>
```

## The root \<order> element

- Attributes uuid (UUID on Wikipedia) and code are always present. Both are the unique identifier of the order. Attribute code exists for human use and can be remembered. Usually, it contains a number but it may contain also other characters based on the shop configuration. Otherwise, uuid may be used in situations when you don't want humans to remember this.  
- Attribute `invoiceNumber` contains the number of an invoice related to this order.  
- Attribute `variableNumber` contains a payment reference number that is useful for bank transfer payments. This number should be filled by the customer in his internet banking.  
- Attribute `originName` contains value eshop for orders created on the shop itself or a code-name of external service where was the order created.  
- Attribute `originCode` is present only when the `originName` value is not eshop. In this case, it contains the order code (ID) that is used for communication with the external service where the order created. The `originCode` may be different form the main code.  
- Attribute `originStatusId` is present only when the originName value is not eshop. In this case, it contains the order status ID from the external service where was the order created. It is an ID defined in the external system API.

```
<order uuid="5dad1a2f-2431-410e-8330-e238666e5dff" code="12345" variableNumber="12345" invoiceNumber="202012345" originName="heurekaCartSk" originCode="98765" originStatusId="1">
```

## Payments

- The `<payments>` element is a wrapper element that may contain more `<payment>` elements related to the order. The element is direct descendant of the root `<order>` element and is always present.  
For a new order, only one element `<payment>` exists.  
- The `<payment>` element is direct descendant of the root `<payments>` element and is always present.  
- Attribute `methodName` is always present and contains a code-name of the payment method. Not-complete list of possible payment method is below. The list contains the common methods but the attribute methodName may contain also a value not in the list. For each specific payment gateway exists a new code-name.

```
- cash  
- cash_onDelivery  
- creditCardOnDelivery  
- bankTransfer  
- payPal_paypal  
- stripe_stripe  
- przelewy24_przelewy24  
…
```

- Attributes `priceAmount` and `currency` (currency code format) are always present and contains the amount and currency code of the price amount related to this specific payment. Usually, it contains the amount that was paid by the customer on a payment gateway.  
- Attribute `externalNumber` contains an identification number of the payment from the payment provider side.  
- Attribute `externalState` provides a code representing the state of the payment. Some of the possible values are in the list bellow but may contain also a specific ones realted to particular `methodName`.

```
- pending  
- paid  
- expired  
- cancelled  
- failed  
…
```

- Attributes `customCode` is a string value that may be assigned to the payment method in the shop administration or by payment gateway. If there is an ID for payment option in your external system [ERP], that ID can be filled in the shop administration interface and will be passed in the `customCode` attribute in the XML.  
- Attribute `linkCustomCode` is also a string value that may be assigned to a combination of payment and delivery method (link between payment and delivery method) in the shop administration. If there is an ID in your external system [ERP] for delivery-and-payment combination, that ID can be filled in the shop administration interface and will be passed in the `linkCustomCode` attribute in the XML.