Skip to main content

Overview

This section describes how to create a replacement order in Global-e.

CreateOrder (Merchant to Global-e)

The CreateOrder API is used to create a replacement order in Global-e. Key constraints:
  • Products must be pre-registered with Global-e.
  • Replacement orders inherit shipping service and details from the original unless specified.
  • Customers are not charged upgrade costs or remote area fees.
  • Destination country cannot change from the original order.
  • Orders default to Delivered Duty Paid (DDP) when supported.
  • Merchants must validate the original order status independently.
  • Billing details are immutable.
  • Added value replacement is unsupported.
  • Authentication uses Merchant GUID.
  • Must be implemented using cart item ID.
  • An OrderReplacementCreated email is sent upon successful replacement creation.

CreateOrder — full request & response

Parameters, schema, examples, and the interactive playground for POST /checkout/CreateOrder.

CreateOrder Specification

The full schema for all request and response objects — SendOrderData, SendCartData, OrderReplacementData, ReplacedProduct, CartUserDetails, CustomProductAttribute, Discount, and CreateOrderResponse — is rendered automatically from the spec on the API Reference page. The narrative sections below cover logic and lookup tables not part of the schema.

Hub Selection Logic

Resolution order of precedence:
  1. If HubId is provided → use that hub.
  2. If only HubCountryCode is provided and matches the original order → use the original hub.
  3. If HubCountryCode differs from the original → use the first active merchant hub in that country.
  4. If neither HubId nor HubCountryCode is provided → use the original order hub.
  5. Fallback: first active merchant hub in the merchant’s country.

Discount Type Options

ValueDescription
1Cart discount
2Shipping discount
3Loyalty points discount
4Duties discount
5Checkout Loyalty Points Discount
6Payment Charge