Skip to main content

Documentation Portal

GetCheckoutCartInfo (Global-e to Merchant)

The GetCheckoutCartInfo API retrieves cart information for international checkout processing. This API:

  • Is triggered when the cart page loads or when a checkout attempt is made

  • Only returns products that are in stock

  • Requires proper cart token validation

  • Is part of Global-e's extensions (custom integration only)

This method is called from a Global-e server with the cart token rendered in a cookie or HTML.DOM. The client's session calculates the price totals. The GetCheckoutCartInfo API returns all cart contents, including customer information for logged-in customers

This API only returns products that are in stock. If special handling is required for stock validation on your side, for products in the basket (for example, calls to an external system), Global-e can specify an additional URL for this method, to indicate that stock validation is specifically required.

If the cart data is unavailable, the checkout will not open and an error message will appear in the browser development console.

The GetCheckoutCartInfo API is only triggered upon the cart page loading, or when a checkout attempt is made.

Note

This API is part of Global-e's extensions and plug-ins. Merchants do not need to implement this API unless a custom integration in required.

Method/URL

Client-side: GET

Server-side: GET/ POST (default GET). Global-e can configure your preference.

GET https://www.merchant-site-domain.com/get-checkout-cart-info-url
POST https://www.merchant-site-domain.com/get-checkout-cart-info-url
Parameters

Request

Requests can contain more parameters than listed.

Name

Type

Description

Mandatory

countryCode

String

2-char ISO code for the country to which shipped

No

currencyCode

String

3-char currency code for the country to which shipped

No

merchantCartToken

String

Identifier used for the cart by the Merchant’s site

No

Response

Returns all cart contents, including customer information for logged-in customers.

Note

Some values are encoded and require the merchant to decode them, for example URLs, addresses, emails, and phone numbers.

Name

Type

Description

CheckoutCartInfo

Object CheckoutCartInfo

Retrieves cart information

Examples