Order extra fields

Order extra fields allow you to save additional information into the order and get it via Ecwid REST API.

Add a new field to order comments at store checkout

// Init order fields 
ec.order = ec.order || {};
ec.order.extraFields = ec.order.extraFields || {};

// Add new text field to order comments section at checkout
ec.order.extraFields.how_you_found_us = {
    'title': 'How did you find us?',
    'type': 'text',
    'checkoutDisplaySection': 'payment_details'


Find your saved information in order details via REST API

    "total": 12.35,
    "orderNumber": 104,
    "extraFields": {
        "how_you_found_us": "I clicked an ad on Facebook."

For example, if you need to save a cookie into an order or if you need to ask a customer a couple of questions at checkout – it’s totally possible with the order extra fields. Later it can be retrieved via the Ecwid REST API when getting order details or searching for orders.

Table of contents