Order API
Last updated
Last updated
In addition to the Plug & Play integration, 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
After the purchase in the Glopal Checkout, Glopal Order API will emit different events as the order goes through order processing. To integrate with Glopal, you have to write code that will take action on specific events. You can setup a webhook to listen on events, or pull events with the /v2/events/{store_id}
endpoint. We recommend the pull method for easier integration.
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.
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
).
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.
Note: When cancelling the order either via API or Glopal Merchant Account 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.
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.
Store Identifier
Successful response
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.
Store Identifier
Glopal Order Identifier
"310678-936140"
^\d+-\d+$
Loosely codified set of reasons.
Glopal may be using different reasons, including:
Cancellation can be initiated by either you or Glopal. Cancellations requested through this API endpoint will always be marked as initiated by the merchant.
Successful response
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.
Store Identifier
Glopal Order Identifier
"310678-936140"
^\d+-\d+$
Loosely codified set of reasons.
Glopal may be using different reasons, including:
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.
Successful response
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.
Store Identifier
Glopal Order Identifier
"310678-936140"
^\d+-\d+$
Successful response
Calculate full or partial monetary refund.
Amount is given in the order currency.
Store Identifier
Glopal Order Identifier
"310678-936140"
^\d+-\d+$
Successful response
Store Identifier
Glopal Order Identifier
"310678-936140"
^\d+-\d+$
Successful response
"310678-936140"
^\d+-\d+$
List of available statuses depends on the integration kind
Currency buyer used to place this order
Language buyer used to place this order
Order note passed from the cart
Order note by Glopal
Currency exchange rate used to convert to order currency.
Can have up to 8 decimals.
Defined as 1 = X where following example defines 1 USD = 0.9102 EUR:
{
currency: 'EUR',
exchange_rates: {
USD: {
rate: 0.9102
}
}
}
Creation time in UTC timezone
Romanized shipping address in UTF-8 encoding but restricted to Latin1 character set, if feature is enabled
Stored copy of the Checkout API cart transfer payload