Skip to content

Shopify Payment XML

The XML format documented here is used for the import of order payments into Shopify, via the Import Order Payments to Shopify task.

We recommend that the external_id field be populated with the unique ID of the payment from the external system, Zynk uses this field to track payments already imported to prevent duplicates being created in Shopify.

XML

Any fields not documented below are not supported by our Shopify connector. Examples of where in the XML the fields should appear are shown in the samples below.

<?xml version="1.0" encoding="utf-8"?>
<transactions>
  <transaction>
    <external_id>#1930</external_id>
    <amount>100.00</amount>
    <authorization>120381223124141</authorization>
    <authorization-expires-at>2023-01-01T00:00:00-04:00</authorization-expires-at>
    <currency>GBP</currency>
    <extended-authorization-attributes>
      <standard-authorization-expires-at>2023-01-01T00:00:00-04:00</standard-authorization-expires-at>
      <extended-authorization-expires-at>2023-01-30T00:00:00-04:00</extended-authorization-expires-at>
    </extended-authorization-attributes>
    <gateway>shopify_payments</gateway>
    <order-id>2031856</order-id>
    <order-name>#1930</order-name>
    <kind>capture</kind>
    <parent-id>584698724408</parent-id>
    <processed-at>2023-01-01T00:00:00-04:00</processed-at>
    <status>success</status>
    <test>false</test>
    <user-id>193415153856</user-id>
  </transaction>
</transactions>

In each of the following sections most of the XML has been omitted to make the samples easier to read. The whole structure of the transactions schema is used below as a reference of where fields should be in the object model.

Transaction

The following information can be specified within the 'transaction' element.

Shopify Field XML Field  Type  Input  Notes
- external_id string Optional Stored in Zynk's internal DB and used in conjunction with the 'Prevent Reprocessing' setting
Amount amount decimal Optional If not provided, defaults to the total cost of the order
Authorization code authorization string Optional
Authorization expires at authorization-expires-at DateTime Optional
Currency currency string Optional Use the 3 letter ISO 4217 code
Standard authorization period expiry extended-authorization-attributes/standard-authorization-expires-at DateTime Optional
Extended authorization period expiry extended-authorization-attributes/extended-authorization-expires-at DateTime Optional
Gateway gateway string Optional
Order order-id long Dependant Required if a location_id is not provided
Order order-name string Dependant Required if a location is not provided
Type kind enum Optional Valid values: authorization, capture, sale, void, refund
Parent Transaction parent-id long Optional
Processed at processed-at DateTime Optional If not provided, defaults to the date the transaction is created
Status status enum Optional Valid values: pending, failure, success, error
Test test bool Optional Set to true if processing a test transaction
User user-id long Optional
<?xml version="1.0" encoding="utf-8"?>
<transactions>
  <transaction>
    <external_id>#1930</external_id>
    <amount>100.00</amount>
    <authorization>120381223124141</authorization>
    <authorization-expires-at>2023-01-01T00:00:00-04:00</authorization-expires-at>
    <currency>GBP</currency>
    <extended-authorization-attributes>
      <standard-authorization-expires-at>2023-01-01T00:00:00-04:00</standard-authorization-expires-at>
      <extended-authorization-expires-at>2023-01-30T00:00:00-04:00</extended-authorization-expires-at>
    </extended-authorization-attributes>
    <gateway>shopify_payments</gateway>
    <order-id>2031856</order-id>
    <order-name>#1930</order-name>
    <kind>capture</kind>
    <parent-id>584698724408</parent-id>
    <processed-at>2023-01-01T00:00:00-04:00</processed-at>
    <status>success</status>
    <test>false</test>
    <user-id>193415153856</user-id>
  </transaction>
</transactions>