LogoLogo
MerchantsHelpSign in
  • Overview
    • Countries & Currencies
    • Glopal Solutions Portfolio
  • Getting started
    • Shopify
      • Glopal Duty & Tax for Shopify
      • Shopify Collaborator Access
    • BigCommerce
    • Magento (Adobe Commerce)
      • Magento 1
      • Magento 2
        • Magento Activation
        • Magento Configuration
        • Magento Database Model
    • Visualsoft
    • PrestaShop
  • Marketing Solutions
    • Acquisition channels
      • Integrate Google Ads
      • Integrate Facebook Ads
    • Feed localization
      • Read domestic items
      • Localize the items
      • Upload the localized items
    • Features / Customization
      • Google Shopping countries coverage
      • Filters
      • Free listings
      • Comparison Shopping Services (CSS)
    • Google Ads
      • Conversion tracking
      • Standard accounts structure
      • Launching and monitoring Google Ads campaigns
    • Facebook
      • Facebook & Instagram Shops
      • Catalog Based Campaigns
      • Conversion and Brand awareness campaigns
      • Facebook conversion tracking
    • Email marketing
  • Localization
    • Site localization
      • Content localization
      • Price localization
      • Site search
      • Checkout
      • User account
    • Site discovery
      • Domains and Routing
      • Search engine optimization
      • Geo-localization
      • Country selector
    • Content distribution
      • Site security
      • Domains (DNS)
      • Traffic Splitting
        • Akamai
        • Cloudflare
        • Nginx
        • Microsoft IIS
        • AWS CloudFront
        • Magento Cloud
      • Third-party CDN
        • Cloudflare
      • Site speed
    • Integrations
      • CSS customizations
      • JavaScript customizations
      • Server-side customizations
      • Exclude from localization
      • Integration examples
        • Hiding Products
        • Newsletter Signup
        • Custom Price Logic
  • Checkout
    • Localized checkout
      • Overview
      • Styling
      • Integration
        • Callback Functions
        • Confirmation Page
        • Checkout Analytics
        • Allowlisting Glopal IPs
      • Price localization
    • Order processing
      • Order creation
        • Plug & Play integration
        • Order API
        • Event webhook
        • Custom Integration
      • Cancellation & refund
      • Returns
      • Buyer's communication
      • Customer account
    • Financials
      • EU VAT
  • DUTY & TAXES
    • Product Classification
    • Duty & Tax Calculation
      • Product Pricing
      • Supported Countries
    • Compliance Checks
      • Prohibited Goods
      • Denied Party Screening
  • SHIPPING
    • Order Creation
    • Label Generation
    • Manifest
    • Tracking
  • Translations
    • Translation Editor
  • MERCHANT ACCOUNT
    • Dashboards
      • SEO dashboard
  • What's New
    • Release Notes
Powered by GitBook
On this page
  1. Checkout
  2. Order processing
  3. Order creation

Order API

PreviousPlug & Play integrationNextEvent webhook

Last updated 10 months ago

In addition to the , Glopal exposes Order API that can be used to receive and process orders completed in the Glopal Checkout back into your eCommerce platform backend or other related systems, and issue refunds and manage return requests.

For your convenience, you can download the description in the OpenAPI format. Please reach out to your Glopal account manager to receive the endpoint and the API key to start your integration.

The latest API version is 2.3.2

Receiving orders

Endpoints

Integration guide

You can choose to import orders on RECEIVED (right after the Glopal Checkout) or READY event when Glopal marks the order as ready to be accepted by merchants. If you are just starting a new integration, we recommend starting with the READY event.

When pulling you can record the last seen event, and use this as a cursor to pull additional events.

curl -G \
  'https://{server}/v2/events/{store_id}' \
  -d 'event=order.ready&after_event_id=' \
  -H 'Authorization: Bearer GL.***'

Parameters event and after_event_id should be passed in the URL query (after ?)

curl -G \
  'https://{server}/v2/events/{store_id}' \
  -d 'event=order.ready&after_event_id={event_id}' \
  -H 'Authorization: Bearer GL.***'

Parameters event and after_event_id should be passed in the URL query (after ?)

Each event returns order_id that can be used to fetch order details and then accept the order, returning your order id and number (reference) to Glopal. Glopal will use your order number to include in the order confirmation email or in the shipping & logistics part of the Glopal solution.

Note: All order amounts are presented in the transaction currency (buyerโ€™s currency). You can choose to import the order into your system either in this or in your base currency. To import the order in the base currency, divide all amounts by the rate included in the order details response (field exchange_rates.{base}.rate).

curl \
  'https://{server}/v2/orders/{store_id}/{order_id}' \
  -H 'Authorization: Bearer GL.***'

curl -X POST \
  'https://{server}/v2/orders/{store_id}/{order_id}/accept' \
  -d '{"external": {"order_id": "42", "order_number": "ECOM-2022-42"}}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer GL.***'

Order can only be accepted once, but the call is idempotent if called with the same parameters. On success, Glopal returns HTTP 200 with {"status": "ok"} JSON response. On error, you should receive HTTP 400 with an error description in the JSON response.

If for any reason order can not be accepted, you can cancel the order, with an automatic refund.

Cancelation and refunds

After the purchase in the Glopal Checkout, Glopal Order API will emit different events as the order goes through . To integrate with Glopal, you have to write code that will take action on specific events. You can setup a to listen on events, or pull events with the /v2/events/{store_id} endpoint. We recommend the pull method for easier integration.

Note: When cancelling the order either via API or user interface, Glopal will not update the order in your eCommerce backend / OMS. You can either ensure that the order is canceled inside your eCommerce backend, before canceling it through Glopal or listen / pull for the order.cancelled event via Order API.

order processing
webhook
Glopal Merchant Account
Plug & Play integration
46KB
openapi-order.yaml

Get stream of order events

get

Use this endpoint to pull RECEIVED / READY / CANCELLED orders to import into your ecommerce site, OMS or other systems.

Filter for one or multiple events by passing multi-value event query parameter ("?event=order.ready&event=order.cancelled").

When pulling, record the last seen event_id in the system pulling orders and use it as after_event_id parameter in the next pull.

Authorizations
Path parameters
store_idstringRequired

Store Identifier

Query parameters
eventstringRequired
before_event_idstringOptional

Last seen Event ID for forward pagination. Must be valid Event ID.

after_event_idstringOptional

Last seen Event ID for backward pagination. Must be valid Event ID.

countinteger ยท min: 1 ยท max: 100Optional

Events in response

Default: 20
Responses
200
Successful response
application/json
401
Invalid authentication
404
Store not found or access not authorized
get
GET /v2/events/{store_id}?event=text HTTP/1.1
Host: 
Authorization: Bearer token
Accept: */*
{
  "links": {
    "next": "text",
    "current": "text",
    "previous": "text"
  },
  "events": [
    {
      "event_id": "text",
      "event_name": "order.received",
      "event_at": "2025-05-22T20:22:59.575Z",
      "order_id": "310678-936140",
      "external": {
        "order_id": "text",
        "order_number": "text"
      },
      "entity_id": "text"
    }
  ]
}

Get a specific Glopal order details

get
Authorizations
Path parameters
store_idstringRequired

Store Identifier

order_idstringRequired

Glopal Order Identifier

Example: 310678-936140Pattern: ^\d+-\d+$
Responses
200
Successful response
application/json
401
Invalid authentication
404
Store or Order not found, or access not authorized
get
GET /v2/orders/{store_id}/{order_id} HTTP/1.1
Host: 
Authorization: Bearer token
Accept: */*
{
  "id": "310678-936140",
  "status": "RECEIVED",
  "external": {
    "order_id": "text",
    "order_number": "text"
  },
  "currency": "EUR",
  "language": {
    "0": "fr",
    "1": "fr-FR",
    "2": "zh-Hans",
    "3": "zh-Hans-CN"
  },
  "environment": "live",
  "customer_note": "text",
  "internal_note": "text",
  "exchange_rates": {
    "USD": {
      "rate": 0.9102
    }
  },
  "created_at": "2025-05-22T20:22:59.575Z",
  "customer": {
    "first_name": "text",
    "last_name": "text",
    "email": "text",
    "email_alias": "text",
    "email_marketing_consent": "granted",
    "attributes": {}
  },
  "billing_address": {
    "first_name": "text",
    "last_name": "text",
    "company": "text",
    "address1": "text",
    "postcode": "text",
    "city": "text",
    "state": "text",
    "country_code": "FR",
    "telephone": "text"
  },
  "shipping_address": {
    "first_name": "text",
    "last_name": "text",
    "company": "text",
    "address1": "text",
    "postcode": "text",
    "city": "text",
    "state": "text",
    "country_code": "FR",
    "telephone": "text"
  },
  "shipping_address_latin1": {
    "first_name": "text",
    "last_name": "text",
    "company": "text",
    "address1": "text",
    "postcode": "text",
    "city": "text",
    "state": "text",
    "country_code": "FR",
    "telephone": "text"
  },
  "glopal_summary": {
    "total": 1
  },
  "merchant_summary": {
    "total": 1
  },
  "summary": {
    "total": {
      "total": 1,
      "amount_net": 1,
      "tax_on_amount": 1,
      "glopal_tax_scheme": "euvat-ioss"
    },
    "items": {
      "total": 1,
      "amount_net": 1,
      "tax_on_amount": 1,
      "glopal_tax_scheme": "euvat-ioss"
    },
    "shipping": {
      "total": 1,
      "amount_net": 1,
      "tax_on_amount": 1,
      "glopal_tax_scheme": "euvat-ioss"
    },
    "discounts": {
      "total": 1,
      "amount_net": 1,
      "tax_on_amount": 1,
      "glopal_tax_scheme": "euvat-ioss"
    },
    "extra": {
      "total": 1,
      "amount_net": 1,
      "tax_on_amount": 1,
      "glopal_tax_scheme": "euvat-ioss"
    }
  },
  "merchant_actions": {
    "is_cancellable": true,
    "is_refundable": true
  },
  "documents": [
    {
      "name": "invoice",
      "url": "text"
    }
  ],
  "cart_transfer": {
    "checkout_id": "text",
    "visitor": {},
    "cart": {},
    "items": [
      {}
    ],
    "shipping": {},
    "referrer": "text",
    "tracking": {},
    "discounts": [
      {}
    ]
  },
  "total_cost": {
    "transaction_id": "text",
    "transactions": [
      {
        "transaction_id": "text",
        "from_country": "FR",
        "hub_code": "text",
        "duty_calculation_rule": "CIF",
        "tax_calculation_rule": "CIF",
        "incoterms": "DDP",
        "is_duty_deminimis_applied": true,
        "is_tax_deminimis_applied": true,
        "summary": {
          "total": {
            "total": 1,
            "amount_net": 1,
            "duty_on_amount": 1,
            "tax_on_amount": 1,
            "tax_on_duty": 1,
            "total_cost_transaction_id": "text",
            "glopal_tax_scheme": "euvat-ioss"
          },
          "items": {
            "total": 1,
            "amount_net": 1,
            "duty_on_amount": 1,
            "tax_on_amount": 1,
            "tax_on_duty": 1,
            "total_cost_transaction_id": "text",
            "glopal_tax_scheme": "euvat-ioss"
          },
          "shipping": {
            "total": 1,
            "amount_net": 1,
            "duty_on_amount": 1,
            "tax_on_amount": 1,
            "tax_on_duty": 1,
            "total_cost_transaction_id": "text",
            "glopal_tax_scheme": "euvat-ioss"
          },
          "discounts": {
            "total": 1,
            "amount_net": 1,
            "duty_on_amount": 1,
            "tax_on_amount": 1,
            "tax_on_duty": 1,
            "total_cost_transaction_id": "text",
            "glopal_tax_scheme": "euvat-ioss"
          },
          "extra": {
            "total": 1,
            "amount_net": 1,
            "duty_on_amount": 1,
            "tax_on_amount": 1,
            "tax_on_duty": 1,
            "total_cost_transaction_id": "text",
            "glopal_tax_scheme": "euvat-ioss"
          }
        },
        "tax_charges": [
          {
            "name": "text",
            "code": "text",
            "type": "text",
            "value": 1
          }
        ],
        "extra_charges": [
          {
            "name": "Fuel Surcharge - FR DHL",
            "code": "fuel_surcharge",
            "type": "shipping_charge",
            "value": 2.05
          }
        ]
      }
    ]
  },
  "shipping": {
    "display_name": "text",
    "service_name": "ECONOMY",
    "service_code": "text",
    "translated_name": "text",
    "tracking": [
      {
        "provider": "glopal",
        "number": "text",
        "url": "https://example.com"
      }
    ],
    "parcel_forwarding": {
      "glopal_shipping_charge": {
        "total": 1,
        "amount_net": 1,
        "tax_on_amount": 1,
        "glopal_tax_scheme": "euvat-ioss"
      },
      "merchant_shipping_charge": {
        "total": 1,
        "amount_net": 1,
        "tax_on_amount": 1,
        "glopal_tax_scheme": "euvat-ioss"
      },
      "hub_address": {
        "first_name": "text",
        "last_name": "text",
        "company": "text",
        "address1": "text",
        "postcode": "text",
        "city": "text",
        "state": "text",
        "country_code": "FR",
        "telephone": "text"
      }
    },
    "shipping_charge": {
      "total": 1,
      "amount_net": 1,
      "tax_on_amount": 1,
      "glopal_tax_scheme": "euvat-ioss"
    }
  },
  "discounts": [
    {
      "name": "text",
      "display_name": "text",
      "code": "text",
      "value_calc": {
        "merchant_amount_net": 1,
        "price_adjustment_rate": 1,
        "price_adjustment_amount": 1,
        "merchant_tax_adjustment_rate": 1,
        "merchant_tax_adjustment_amount": 1,
        "display_destination_tax_rate": 1,
        "display_amount": 1,
        "tax_rate": 20
      },
      "value": {
        "total": 1,
        "amount_net": 1,
        "tax_on_amount": 1,
        "glopal_tax_scheme": "euvat-ioss"
      }
    }
  ],
  "items": [
    {
      "id": "text",
      "product_id": "text",
      "variant_id": "text",
      "name": "text",
      "translated_name": "text",
      "sku": "text",
      "origin_url": "https://example.com",
      "image_url": "https://example.com",
      "quantity": 1,
      "options": [
        {
          "option_id": "text",
          "value_id": "text",
          "name": "text",
          "value": "text",
          "translated_name": "text",
          "translated_value": "text",
          "attributes": {}
        }
      ],
      "attributes": {},
      "unit_price_calc": {
        "merchant_amount_net": 1,
        "price_adjustment_rate": 1,
        "price_adjustment_amount": 1,
        "merchant_tax_adjustment_rate": 1,
        "merchant_tax_adjustment_amount": 1,
        "display_destination_tax_rate": 1,
        "display_amount": 1,
        "tax_rate": 20
      },
      "calculation_rule": "line_price",
      "unit_price": {
        "total": 1,
        "amount_net": 1,
        "tax_on_amount": 1,
        "glopal_tax_scheme": "euvat-ioss"
      },
      "line_price": {
        "total": 1,
        "amount_net": 1,
        "tax_on_amount": 1,
        "glopal_tax_scheme": "euvat-ioss"
      },
      "discounts": {
        "total": {
          "unit_discount": {
            "amount_net": 1
          }
        }
      },
      "total_cost": {
        "transaction_id": "text",
        "hs_code": "401519",
        "country_of_origin": "FR",
        "duty_rate": 16,
        "duty_deminimis": 150,
        "tax_rate": 20,
        "tax_deminimis": 1
      }
    }
  ],
  "returns": [
    {
      "id": "text",
      "created_at": "2025-05-22T20:22:59.575Z",
      "status": "REQUESTED",
      "note": "text",
      "external_id": "text",
      "rma_id": null,
      "shipment": {
        "tracking_number": "text",
        "carrier_name": "text",
        "label_pdf": {
          "url": "https://example.com",
          "filename": "text"
        },
        "advice_pdf": {
          "url": "https://example.com",
          "filename": "text"
        }
      },
      "items": [
        {
          "id": "text",
          "quantity": 1,
          "reason": "text"
        }
      ]
    }
  ]
}
  • Receiving orders
  • Endpoints
  • GETGet stream of order events
  • GETGet a specific Glopal order details
  • POSTAccept order, setting external order IDs
  • Integration guide
  • Cancelation and refunds
  • POSTCancel order
  • POSTCalculate order refund
  • POSTRefund order

Accept order, setting external order IDs

post

Observing new order from Glopal, use this endpoint to set your own order ID and order number and confirm order as accepted.

If order is already accepted having different external IDs, or if order is cancelled, request will be rejected as invalid.

It is recommended to call this endpoint only after order is marked as READY by Glopal.

Note that if this order was not previously marked as READY by Glopal, calling this endpoint will not result with the order being ACCEPTED immediately. Instead, order processing will continue on the Glopal side and order will be marked as ACCEPTED only if and after it is marked as READY by Glopal.

It is not recommended to use this endpoint together with plug'n'play integration where Glopal is attempting to insert READY orders automatically to your ecommerce backend. When using plug'n'play integration, Glopal will fetch external order IDs set by your ecommerce backend and mark order as ACCEPTED once it is inserted via plug'n'play integration.

Authorizations
Path parameters
store_idstringRequired

Store Identifier

order_idstringRequired

Glopal Order Identifier

Example: 310678-936140Pattern: ^\d+-\d+$
Body
externalall ofRequired
Responses
200
Successful response
application/json
Responseall of
400
Invalid request
401
Invalid authentication
404
Store or Order not found, or access not authorized
post
POST /v2/orders/{store_id}/{order_id}/accept HTTP/1.1
Host: 
Authorization: Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "external": {
    "order_id": "text",
    "order_number": "text"
  }
}
{
  "status": "ok"
}

Cancel order

post

Observing new order from Glopal, use this endpoint to reject the order.

Cancellation will automatically void any payment, triggering full refund or release of authorization.

You can also cancel orders that were previously accepted, assuming that order was not shipped. To refund orders that were shipped to the customer, please use the the Refund endpoint instead.

Authorizations
Path parameters
store_idstringRequired

Store Identifier

order_idstringRequired

Glopal Order Identifier

Example: 310678-936140Pattern: ^\d+-\d+$
Body
reasonstringOptional

Loosely codified set of reasons.

Glopal may be using different reasons, including:

  • duplicate_order
  • incorrect_address
  • price_mismatch
  • item_out_of_stock
  • other

Cancellation can be initiated by either you or Glopal. Cancellations requested through this API endpoint will always be marked as initiated by the merchant.

notestringOptional
Responses
200
Successful response
application/json
Responseall of
400
Invalid request
401
Invalid authentication
404
Store or Order not found, or access not authorized
post
POST /v2/orders/{store_id}/{order_id}/cancel HTTP/1.1
Host: 
Authorization: Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 31

{
  "reason": "text",
  "note": "text"
}
{
  "status": "ok"
}

Calculate order refund

post

Calculate full or partial monetary refund.

Amount is given in the order currency.

Authorizations
Path parameters
store_idstringRequired

Store Identifier

order_idstringRequired

Glopal Order Identifier

Example: 310678-936140Pattern: ^\d+-\d+$
Body
amountnumberRequired
reasonstring ยท enumRequiredPossible values:
notestringOptional
Responses
200
Successful response
application/json
400
Invalid request
401
Invalid authentication
404
Store or Order not found, or access not authorized
post
POST /v2/orders/{store_id}/{order_id}/refund-quote HTTP/1.1
Host: 
Authorization: Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "amount": 100,
  "reason": "not_as_described"
}
{
  "quote": {
    "merchant_amount": 100,
    "glopal_amount": 0,
    "reason": "not_as_described"
  },
  "messages": [
    "Glopal collected taxes and/or duties, and this charge is non-refundable",
    "For buyer to receive refund, amount of 100.00 GBP will be deducted from your next payout"
  ]
}

Refund order

post

Issue full or partial monetary refund.

If order is having split payment between Glopal and Merchant, request makes liability split, optionally raising a claim with Glopal if requesting that Glopal pays for the refund, fully or in part.

You can either call this endpoint directly, or use Quote Refund endpoint to pre-calculate liability.

Amounts are given in the order currency.

To cancel orders that were not shipped to the customer, please use the the Cancel endpoint instead.

Authorizations
Path parameters
store_idstringRequired

Store Identifier

order_idstringRequired

Glopal Order Identifier

Example: 310678-936140Pattern: ^\d+-\d+$
Body
merchant_amountnumberRequired
glopal_amountnumberRequired
reasonstringOptional

Loosely codified set of reasons.

Glopal may be using different reasons, including:

  • returned
  • lost_or_damaged
  • not_as_described
  • other

Refund can be initiated by either you, Glopal or by lost dispute. Refunds requested through this API endpoint will always be marked as initiated by the merchant.

Default: other
notestringOptional
Responses
200
Successful response
application/json
Responseall of
400
Invalid request
401
Invalid authentication
404
Store or Order not found, or access not authorized
post
POST /v2/orders/{store_id}/{order_id}/refund HTTP/1.1
Host: 
Authorization: Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "merchant_amount": 1,
  "glopal_amount": 1,
  "reason": "other",
  "note": "text"
}
{
  "status": "ok"
}