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
OrderReplacementCreatedemail 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:- If
HubIdis provided → use that hub. - If only
HubCountryCodeis provided and matches the original order → use the original hub. - If
HubCountryCodediffers from the original → use the first active merchant hub in that country. - If neither
HubIdnorHubCountryCodeis provided → use the original order hub. - Fallback: first active merchant hub in the merchant’s country.
Discount Type Options
| Value | Description |
|---|---|
| 1 | Cart discount |
| 2 | Shipping discount |
| 3 | Loyalty points discount |
| 4 | Duties discount |
| 5 | Checkout Loyalty Points Discount |
| 6 | Payment Charge |

