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
Receiving orders
Endpoints
Integration guide
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.
Cancelation and refunds
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.
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.
POST/v2/orders/{store_id}/{order_id}/cancel
Path parameters
store_id*string
Store Identifier
order_id*OrderId (string)
Glopal Order Identifier
Example: "310678-936140"
Body
reasonstring
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.
notestring
Response
Successful response
Body
status*enum
ok
Request
Response
Refund order
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.
POST/v2/orders/{store_id}/{order_id}/refund
Path parameters
store_id*string
Store Identifier
order_id*OrderId (string)
Glopal Order Identifier
Example: "310678-936140"
Body
merchant_amount*Amount (number)
glopal_amount*Amount (number)
reasonstring
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.
notestring
Response
Successful response
Body
status*enum
ok
Request
Response
Accept order, setting external order IDs
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.
POST/v2/orders/{store_id}/{order_id}/accept
Path parameters
store_id*string
Store Identifier
order_id*OrderId (string)
Glopal Order Identifier
Example: "310678-936140"
Body
external*AcceptOrderRequest (all of)
Response
Successful response
Body
status*enum
ok
Request
Response
Get stream of order events
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.
GET/v2/events/{store_id}
Path parameters
store_id*string
Store Identifier
Query parameters
Response
Successful response
Body
linksobject
events*array of EventListItem (object)
Request
Response
Calculate order refund
Calculate full or partial monetary refund.
Amount is given in the order currency.
POST/v2/orders/{store_id}/{order_id}/refund-quote
Path parameters
store_id*string
Store Identifier
order_id*OrderId (string)
Glopal Order Identifier
Example: "310678-936140"
Body
amount*Amount (number)
reason*enum
returnedlost_or_damagednot_as_describedother
notestring
Response
Successful response
Body
quote*object
messages*array of string
Request
Response
Get a specific Glopal order details
GET/v2/orders/{store_id}/{order_id}
Path parameters
store_id*string
Store Identifier
order_id*OrderId (string)
Glopal Order Identifier
Example: "310678-936140"
Response
Successful response
Body
idOrderId (string)
Example: "310678-936140"
statusOrderStatus (enum)
List of available statuses depends on the integration kind
RECEIVEDREADYACCEPTEDCOMPLETEDCANCELLED
externalOrderExternalIds (object)
currencyall of
Currency buyer used to place this order
languageall of
Language buyer used to place this order
environmentenum
livetest
customer_notestring
Order note passed from the cart
internal_notestring
Order note by Glopal
exchange_ratesobject
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: