Skip to main content

Documentation Portal

Checkout Methods

Note

These methods are implemented by the Global-e extensions and plug-ins and do not need to be implemented by the brand.

SendCartV2

The method sends the end customer’s cart contents from the Merchant’s site to Global-e and returns a unique Cart Token to be further passed by the Merchant’s site to the Global-e checkout widget or to API checkout methods.

SAMPLE

Body:

{
    "CountryCode": "AU",
    "ClientIP": "128.128.128.128",
    "Currency": {
        "OriginalCurrencyCode": "GBP",
        "CurrencyCode": "AUD"
    },
    "PriceModification": {
        "RoundingRuleId": 103,
        "PriceCoefficientRate": 1,
        "IncludeVAT": null
    },
    "Culture": {
        "PreferedCultureCode": null,
        "InputDataCultureCode": null,
        "CultureCode": "en-GB"
    },
    "LocalShippingOptions": [{
            "Carrier": "globaleintegration_standard",
            "CarrierTitle": "globaleintegration_standard",
            "CarrierName": "globaleintegration_standard",
            "Code": "globaleintegration_standard",
            "Method": "globaleintegration_standard",
            "MethodTitle": "globaleintegration_standard",
            "MethodDescription": "globaleintegration_standard",
            "Price": 0,
            "IsPreferred": true
        }
    ],
    "Products": [{
            "ProductCode": "XE08801",
            "ProductGroupCode": null,
            "Name": "Socks",
            "URL": "https://www.test.com/products/08801",
            "Description": "Naturally Close 5 Pack White Value Trainer Liner Socks",
            "ImageURL": "https://www.test.com/products/08801.jpg",
            "SalePrice": "8.95",
            "OriginalSalePrice": "5",
            "SalePriceBeforeRounding": "8.905175000000000000",
            "LocalVATRateType": {
                "VATRateTypeCode": "merchantVATRateType_20",
                "Name": "merchantVATRateType_20",
                "Rate": 20,
                "InternalVATRateTypeId": 0
            },
            "OrderedQuantity": 1,
            "CartItemId": "111",
            "Attributes": [{
                    "AttributeCode": "color",
                    "Name": "WHITE",
                    "AttributeTypeCode": "color"
                }, {
                    "AttributeCode": "size",
                    "Name": "ONE SIZE",
                    "AttributeTypeCode": "size"
                }
            ]
        }
    ],
    "CartToken": null,
    "MerchantCartToken": "21531332-b15f-4640-ad5e-60887271a89a",
    "UserDetails": {
        "UserId": 12345,
        "AddressDetails": [{
                "UserId": 12345,
                "FirstName": "Test",
                "LastName": "Test-e",
                "Phone1": "01234567",
                "Email": "mmm.bbb@gmail.com",
                "Address1": "2-4 Test St",
                "City": "Alexandria",
                "Zip": "2015",
                "CountryCode": "AU",
                "IsShipping": true,
                "IsBilling": true,
                "IsDefaultShipping": true,
                "IsDefaultBilling": true
            }
        ]
    },
    "Discounts": [],
    "VATRegistration": {
        "VatRegistrationNumber": null,
        "DoNotChargeVAT": false
    },
    "rateData": "bkep2SfLA8VXnA3+mU1e16u5InvGPYAmwm7RpmXveyU=","IsMoto":1}

="
}

URL:

https://{server_name}/Checkout/SendCartV2?merchantGUID=abcdabcd-abcd-abcd-abcd-abcdabcdabcd

ACCEPTS

SendCartData cartData

The Cart Data object (specified in the request body)

Includes user details, product details, discount details, conversion information, vouchers, and any other information required for cart creation.

RETURNS

CartInfo class