Skip to main content

Documentation Portal

SendOrder

The SendOrder API receives the information provided by the customer in the checkout form, sends it to Global-e, and creates a pending payment order in the Global-e system.

If DoAddressVerification is true then SendOrder verifies the address entered by the customer in checkout and returns an indication if the specified address is valid, along with the list of address fix recommendations if available.

For PCI-compliant merchants, if the customer selects а regular card payment method, then send the card details in the SendOrderRequestInfo request.

Method/URL

https://connect.bglobale.com/Checkout/SendOrder

Parameters

Request Parameters

Name

Type

Description

Mandatory (Y/N)

requestInfo

Class SendOrderRequestInfo

Contains details about the customer order.

Y

The request must contain the MerchantCallBackURL property - the URL that the customer should be redirected to when the checkout is finished. Usually, this URL will show a “Thank You” or “Confirmation” page. The format of the URL depends on the channel. This URL can have a maximum of 1024 characters.

  • For web - include the protocol http:// or https://. You can also include additional query parameters, such as shopper ID or order reference number.

    Example: https://your-company.com/checkout?shopperOrder=12xy

  • For iOS - use the custom URL for your app. To know more about setting up custom URL schemes, refer to the Apple Developer documentation.

    Example: my-app://

  • For Android - use a custom URL handled by an Activity on your app. You can configure it with an intent filter.

    Example: my-app://your.package.name

When a redirect action is required:

  • The SendOrderResponseInfo contains the ResponseCode with the value of the Redirect.

  • If the ResponseCode value is “Challenge3DS”, the 3DS1 flow is required to be run on the client.

  • If the ResponseCode value is “PreEnroll3DS”, the 3DS2 initialization flow, also known in some gateways as DDC (device data collection), is required to be run on the client.

  • Use the PaymentActionURL parameter in the SendOrderResponseInfo class to redirect the customer to the URL of the Payment Service Provider (PSP); for instance, PayPal. See Figure 1: Checking Out via the API Sequence Diagram.

  • After the payment has been processed, the customer is redirected from the PSP URL to a Global-e endpoint, and back to the URL on the merchant’s site, which includes the HMAC hash used to validate the payment authorization URL parameters.

Response Body Parameters

Name

Type

Description

SendOrderResponseInfo

Class SendOrderResponseInfo

Contains details about the customer order to be sent to Global-e.

The SendOrderResponseInfo class returns the order in the Global-e system with all the details, including customer pricing that can be used on the merchant’s site for the customer “My Account” and other customer-facing purposes.

Example

Request Example

{
"CartToken": "abcdabcd-abcd-abcd-abcd-abcdabcdabcd",
"IsTaxPrePaid": true,
"DoAddressVerification": true,
"ShippingMethodId": 1553,
"PaymentMethodId": 2,
"MerchantCallBackURL": http://www.address.com/intredirect/,
"ClientIP": "10.2.0.16",
"UserAgent": "GlobalE Client SDK (Android)",
"AcceptHeader": "text/html",
"CardDetails": {
"OwnerName": "",
"CardNumber": "1234123412341234",
"CVVNumber": "123",
"ExpirationDate": "01/2025"
},
"ShippingDetails": {
"FirstName": "John",
"LastName": "Smith",
"Phone1": "12345",
"Email": "[email protected]",
"Address1": "5th Avenue 123",
"Address2": "",
"City": "New York",
"StateCode": "NY",
"Zip": "12345"
},
"BillingDetails": {
"FirstName": "John",
"LastName": "Smith",
"Phone1": "12345",
"Email": "[email protected]",
"Address1": "5th Avenue 123",
"Address2": "",
"City": "New York",
"StateCode": "NY",
"Zip": "12345"
}
}

Codes

See Error Codes.Error Codes