Checkout Methods
Note
These methods are implemented by the Global-e extensions and plug-ins and do not need to be implemented by the merchant.
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.
Method/URL
POST https://connect.bglobale.com/Checkout/SendCartV2
Parameters
Request
Name | Type | Description | Mandatory (Y/N) |
---|---|---|---|
| Object | Details about the end customer’s cart contents from the Merchant’s site. Includes user details, product details, discount details, conversion information, vouchers, and any other information required for cart creation | Y |
Response Parameters
Name | Type | Description |
---|---|---|
| Object | Contains details about the end customer's cart. |
Examples
Request
{ "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 } ], "MerchantCartToken":"3049549", "MerchantOrderId":"45345454", "PlatformURLs":{ "SiteURL": "http://test.com/my_url.html", "RedirectToCartURL": "http://test.com/callback_URL.html" "PaymentCallbackURL": "http://test.com/paymentCallback_URL.html" }, "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", "ImageURL":"https://test.test.com/1.jpg", "IsBackOrdered":false, "IsFixedPrice":true, "ListPrice":58.2, "Attributes": [{ "AttributeCode": "color", "Name": "WHITE", "AttributeTypeCode": "color" }, { "AttributeCode": "size", "Name": "ONE SIZE", "AttributeTypeCode": "size" } ], "MetaData":{ "Attributes": [{ "AttributeKey":"earliestDeliveryDate", "AttributeValue":"1717763520" }, { "AttributeKey":"earliestShipDate" "AttributeValue":"1716985920" } ]} } } ], "CartToken": null, "MerchantCartToken": "21531332-b15f-4640-ad5e-60887271a89a", "UserDetails": { "UserId": 12345, "AddressDetails": [{ "UserId": 12345, "FirstName": "Test", "LastName": "Test-e", "Phone1": "01234567", "Email": "[email protected]", "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} =" }
CreateOrder (Merchant to Global-e)
The CreateOrder API is used to create a replacement order in Global‑e.
Method/URL
POST https://[globale_api_domain]/checkout/CreateOrder
Parameters
Request
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
| String | Merchant's unique ID. | Yes |
| Object SendOrderData | Provides the data that is used to create the new order. | Yes |
Examples
Request
{ "orderReplacement": { "replacedProducts": [ { "quantity": 1.0, "cartItemId": "1" } ], "originalOrderId": "GE10097473894NL" }, "cartData": { "products": [ { "productCode": "460011778068", "isFixedPrice": true, "orderedQuantity": 1.0, "salePrice": "17.90", "cartItemId": "", "parentCartItemId": "1" } ], "userDetails": { "addressDetails": [ { "email": "[email protected]" } ] }, "discounts": [ { "productCartItemId": "", "discountType": 1, "discountValue": 1.79 } ], "shippingMethodCode": "", "merchantOrderId": "Y73186844546755" } }
Response
{ "DateCreated": "1900-01-01T00:00:00Z", "CurrencyName": "Euro", "Parcels": [], "AllowMailsFromMerchant": false, "AllowDirectCommunicationFromMerchant": false, "TnCConsent": null, "ClearCart": true, "UserId": null, "CurrencyCode": "EUR", "Products": [ { "Attributes": null, "Sku": "460011778068", "Price": 14.4400, "PriceBeforeRoundingRate": 14.4400, "PriceBeforeGlobalEDiscount": 14.4400, "Quantity": 1, "VATRate": 0.000000, "CustomerVATRate": 24.000000, "InternationalPrice": 17.9000, "InternationalDiscountedPriceInMerchantCurrency": 16.11, "CartItemId": "1", "ParentCartItemId": "1", "CartItemOptionId": null, "HandlingCode": "", "GiftMessage": "", "RoundingRate": 0.8067039106145251396648044693, "IsBackOrdered": false, "BackOrderDate": null, "DiscountedPrice": 11.70, "InternationalDiscountedPrice": 16.1100, "ProductCodeSecondary": null, "Brand": null, "Categories": null, "ListPrice": 0.00, "InternationalListPrice": 0.00, "GenericHSCode": "950300", "DiscountedPriceForCustoms": 13.00, "InternationalDiscountedPriceForCustoms": 16.11, "DTBreakdown": { "Duties": 0.00, "SalesTaxes": 0.00, "Subsidy": 0.0 }, "InternationalDTBreakdown": { "Duties": 0.00, "SalesTaxes": 0.00, "Subsidy": 0.0 }, "IsGiftCard": false, "IsFixedPrice": true, "EstimatedDeliveryDate": null, "IsParentBundleProductMoved": true } ], "Customer": { "EmailAddress": null, "IsEndCustomerPrimary": true, "SendConfirmation": false }, "PrimaryShipping": { "FirstName": "ES6d%2baTo9sqWUbTiaoRV6Q%3d%3d", "LastName": "jKuexmRWYR%2fbqDrzOFv1iQ%3d%3d", "FirstNameInLocalCulture": "", "LastNameInLocalCulture": "", "MiddleName": null, "Salutation": null, "Company": "", "Address1": "t3ODmjz9nc25%2bLHjNAtvDgl6EE6TZYuoWRqsTk47pDQ%3d", "Address2": "", "City": "4gVF9VRnP9QVeeiDwDSEJw%3d%3d", "CityRegion": "", "StateCode": null, "StateOrProvince": null, "Zip": "ugWciWrRFjU7jR11pEf4jg%3d%3d", "Email": "fci85oZUXWy2WFFvJO5MQv15Y4EtZjHw1O7yIF4qEA4%3d", "Phone1": "CfjORCMc0mNKrwQ4MYcYKQ%3d%3d", "Phone2": "", "Fax": "", "CountryCode": "GR", "CountryCode3": "GRC", "CountryName": "Greece", "AddressBookId": "", "AddressBookName": "", "SaveAddress": false, "VATRegistrationNumber": null, "CustomerTaxId": null, "CollectionPointId": null }, "SecondaryShipping": { "FirstName": "GlobalE", "LastName": "CEVA Logistics", "FirstNameInLocalCulture": null, "LastNameInLocalCulture": null, "MiddleName": null, "Salutation": null, "Company": "", "Address1": "Boekerman 5", "Address2": null, "City": "Roosendaal (Oud Gastel)", "CityRegion": null, "StateCode": "NN", "StateOrProvince": "undefined", "Zip": "4751XK", "Email": null, "Phone1": "000000000", "Phone2": null, "Fax": null, "CountryCode": "NL", "CountryCode3": "NLD", "CountryName": "Netherlands", "AddressBookId": null, "AddressBookName": null, "SaveAddress": false, "VATRegistrationNumber": null, "CustomerTaxId": null, "CollectionPointId": null }, "ShippingMethodCode": "globaleintegration_standard", "Discounts": [ { "Name": "Replacement order-Duties", "Description": "Discount thant generated by global-e to discount the duties in case of replacement order", "Price": 0.0000, "DiscountType": 4, "VATRate": 0.000000, "LocalVATRate": 21.000000, "CouponCode": null, "InternationalPrice": 0.0000, "DiscountCode": "", "ProductCartItemId": null, "LoyaltyVoucherCode": null }, { "Name": "", "Description": "", "Price": 2.7400, "DiscountType": 1, "VATRate": 24.000000, "LocalVATRate": 0.000000, "CouponCode": null, "InternationalPrice": 1.7900, "DiscountCode": "", "ProductCartItemId": null, "LoyaltyVoucherCode": null } ], "Markups": [ { "Name": "Replacement order-Shipping discount", "Description": "Discount thant generated by global-e to discount the shipping cost in case of replacement order", "Price": 19.9000, "DiscountType": 2, "VATRate": 0.000000, "LocalVATRate": 21.000000, "CouponCode": null, "InternationalPrice": 19.9000, "DiscountCode": "", "ProductCartItemId": null, "LoyaltyVoucherCode": null } ], "LoyaltyPointsSpent": 0.0, "LoyaltyPointsEarned": 0.0, "SameDayDispatch": false, "SameDayDispatchCost": 0.0, "DoNotChargeVAT": false, "CustomerComments": "", "IsFreeShipping": true, "FreeShippingCouponCode": "", "ShipToStoreCode": null, "RoundingRate": 0.8067039106145251396648044693, "UrlParameters": null, "OriginalMerchantTotalProductsDiscountedPrice": 0.0000, "LoyaltyCode": null, "OTVoucherCode": null, "OTVoucherAmount": null, "OTVoucherCurrencyCode": null, "IsSplitOrder": false, "PrePayOffered": false, "InitialCheckoutCultureCode": "en-GB", "CultureCode": "en-GB", "HubId": 1001034, "HubCode": null, "IsReplacementOrder": true, "OriginalOrder": { "OrderId": "GE10097473894NL", "MerchantOrderId": "EUQA1116048", "MerchantInternalOrderId": "EUQA1116048" }, "ReservationRequestId": null, "IsSuppressPersonalInformation": false, "TotalDutiesAndTaxesPrice": 0.00, "USSalesTax": 0.0, "CCFPrice": 0.0, "CustomerDTBreakdown": { "Duties": 0.000000000, "SalesTaxes": 0.000000000, "Other": 0.000000000 }, "MerchantDTBreakdown": { "Duties": 0.000000000, "SalesTaxes": 0.000000000, "Other": 0.000000000, "Subsidy": 0.0 }, "ExporterDetails": { "VATRegistrationNumber": "NL859146492B01", "EORINumber": "NL859146492", "IOSSNumber": null }, "ImporterDetails": { "Company": "", "VATRegistrationNumber": "", "CustomerTaxId": null, "ImporterType": 0, "Address": { "Name": "ES6d+aTo9sqWUbTiaoRV6Q==jKuexmRWYR/bqDrzOFv1iQ==", "Address1": "t3ODmjz9nc25+LHjNAtvDgl6EE6TZYuoWRqsTk47pDQ=", "Address2": null, "City": "4gVF9VRnP9QVeeiDwDSEJw==", "StateCode": "NN", "StateOrProvince": "undefined", "Zip": "ugWciWrRFjU7jR11pEf4jg==", "CountryCode": "GR", "Country": "Greece" } }, "OrderPaymentMethods": [], "OrderDocuments": [ { "URL": "https://connect2.bglobale.com/Document/VATInvoice?documentParam=iI9FwInOzaNSAGbwFqpq9foxt%2f7OckWHnJnlegRFId7ccSF3hvqwR%2f2yjQeB%2bI%2fgqy6jYmUKwhUAIHHBB6%2beQYbw0iTmHatSDPpl0nglor8jR6bSG0gsVCRIiIeH0fA6t0INS0gr8EzlEhZT3uPi4I1a9isRex4W5CexHbZrV8EDxm2Ae6w%2fajMBbDQZd%2fmlA8YohMx7nwvL8UEnZFLSPA%3d%3d", "DocumentTypeCode": "5", "DocumentTypeName": "VATInvoice", "DocumentExtension": "pdf", "ErrorMessage": null } ], "ShippingVATRate": 0.0, "TotalDutiesPaidByCustomerPrice": 0.00, "OrderCreationSource": 0, "IsB2B": false, "CookieConsent": 0, "BillingCustomFields": null, "ShippingCustomFields": null, "IsTaxExemption": false, "OrderCreationSourceInfo": null, "Subs": [], "PaymentDetails": null, "PrimaryBilling": { "FirstName": null, "LastName": null, "FirstNameInLocalCulture": null, "LastNameInLocalCulture": null, "MiddleName": null, "Salutation": null, "Company": null, "Address1": null, "Address2": null, "City": null, "CityRegion": null, "StateCode": null, "StateOrProvince": null, "Zip": null, "Email": null, "Phone1": null, "Phone2": null, "Fax": null, "CountryCode": null, "CountryCode3": null, "CountryName": null, "AddressBookId": null, "AddressBookName": null, "SaveAddress": false, "VATRegistrationNumber": null, "CustomerTaxId": null, "CollectionPointId": null }, "SecondaryBilling": { "FirstName": null, "LastName": null, "FirstNameInLocalCulture": null, "LastNameInLocalCulture": null, "MiddleName": null, "Salutation": null, "Company": null, "Address1": null, "Address2": null, "City": null, "CityRegion": null, "StateCode": null, "StateOrProvince": null, "Zip": null, "Email": null, "Phone1": null, "Phone2": null, "Fax": null, "CountryCode": null, "CountryCode3": null, "CountryName": null, "AddressBookId": null, "AddressBookName": null, "SaveAddress": false, "VATRegistrationNumber": null, "CustomerTaxId": null, "CollectionPointId": null }, "CashOnDeliveryFee": 0.0, "OrderId": "GE10098224286NL", "StatusCode": "N/A", "OrderStatusReason": null, "MerchantGUID": "5c8df18d-2e60-4fa0-988f-4cab0f309f2d", "CartId": null, "MerchantOrderId": "Y73186844546755", "MerchantInternalOrderId": null, "PriceCoefficientRate": 1.000000, "CartHash": null, "WebStoreCode": null, "WebStoreInstanceCode": "GlobalEDefaultStoreInstance", "DiscountedShippingPrice": 0.0, "InternationalDetails": { "CurrencyCode": "EUR", "TotalPrice": 16.11, "TransactionCurrencyCode": "EUR", "TransactionTotalPrice": 0.0, "TotalShippingPrice": -19.90, "SameDayDispatchCost": 0.0, "TotalCCFPrice": 0.0, "TotalDutiesPrice": 0.000000000, "USSalesTax": 0.0, "ShippingMethodCode": "GLOBALE", "ShippingMethodName": "DHL api Express Worldwide", "PaymentMethodCode": "39", "PaymentMethodName": "CouponPayment", "CardNumberLastFourDigits": null, "ExpirationDate": null, "DutiesGuaranteed": false, "OrderTrackingNumber": null, "OrderTrackingUrl": "https%3a%2f%2fwww2.bglobale.com%2fOrder%2fTrack%2fmZPd%3fOrderId%3dGE10098224286NL%26ShippingEmail%3dfci85oZUXWy2WFFvJO5MQv15Y4EtZjHw1O7yIF4qEA4%3d", "OrderWaybillNumber": null, "ShippingMethodTypeCode": "Standard", "ShippingMethodTypeName": "Standard Courier", "DeliveryDaysFrom": 1, "DeliveryDaysTo": 2, "DeliveryDateFrom": "24.02", "DeliveryDateTo": "24.02", "ConsignmentFee": 0.0000, "SizeOverchargeValue": 0.0000, "RemoteAreaSurcharge": 0.0000, "DiscountedShippingPrice": 0.0000, "CashOnDeliveryFee": 0.0, "ParcelsTracking": [], "TotalVATAmount": 3.12, "CustomerDTBreakdown": { "Duties": 0.000000000, "SalesTaxes": 0.000000000, "Other": 0.000000000 }, "MerchantDTBreakdown": { "Duties": 0.000000000, "SalesTaxes": 0.000000000, "Other": 0.000000000, "Subsidy": 0.0 }, "ShippingVATRate": 24.000000, "ShippingMethodStatusCode": "Undefined", "ShippingMethodStatusName": "undefined", "ShipmentStatusUpdateTime": null, "ShipmentLocation": null }, "GiftCards": null, "DeclarativeShippingPriceInCustomerCurrency": null, "TotalValueForCustoms": null, "TaxCalculationRule": null, "PaymentTransactionResponseDataExtended": null}