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
invoiceNumbercontains the number of an invoice related to this order. - Attribute
variableNumbercontains a payment reference number that is useful for bank transfer payments. This number should be filled by the customer in his internet banking. - Attribute
originNamecontains value eshop for orders created on the shop itself or a code-name of external service where was the order created. - Attribute
originCodeis present only when theoriginNamevalue 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. TheoriginCodemay be different form the main code. - Attribute
originStatusIdis 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
methodNameis 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
priceAmountandcurrency(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
externalNumbercontains an identification number of the payment from the payment provider side. - Attribute
externalStateprovides 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 particularmethodName.
- pending
- paid
- expired
- cancelled
- failed
…
- Attributes
customCodeis 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 thecustomCodeattribute in the XML. - Attribute
linkCustomCodeis 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 thelinkCustomCodeattribute in the XML.