Create sales order checkout
POST
/merchants/{merchantCode}/orders/{orderNumber}/checkout
const url = 'https://order.shopgate.io/v1/merchants/example/orders/example/checkout';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"campaignAttribution":{"campaignCode":"CMP-1","channel":"push","distributionIndex":0},"paymentTransactions":[{"id":"edadf6a6-f536-489f-92b8-c15fc1edc19b","checkoutParams":{"paymentIntentId":"pi_test_23tz4hrdpgjseroh"}}],"sourceIp":"85.45.62.2","userAgent":"Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0","domain":"www.mydomain.com","platform":"engage","os":"ios"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://order.shopgate.io/v1/merchants/example/orders/example/checkout \ --header 'Content-Type: application/json' \ --data '{ "campaignAttribution": { "campaignCode": "CMP-1", "channel": "push", "distributionIndex": 0 }, "paymentTransactions": [ { "id": "edadf6a6-f536-489f-92b8-c15fc1edc19b", "checkoutParams": { "paymentIntentId": "pi_test_23tz4hrdpgjseroh" } } ], "sourceIp": "85.45.62.2", "userAgent": "Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0", "domain": "www.mydomain.com", "platform": "engage", "os": "ios" }'Create sales order checkout
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”merchantCode
required
string
Unique merchant code which represents the unique “merchant account”.
orderNumber
required
string
Unique order number
Request Body
Section titled “Request Body”Media typeapplication/json
object
campaignAttribution
Campaign the order should be attributed to
object
campaignCode
required
string
channel
required
string
distributionIndex
required
number
Example
{ "campaignCode": "CMP-1", "channel": "push", "distributionIndex": 0}paymentTransactions
Array<object>
object
id
string
Example
edadf6a6-f536-489f-92b8-c15fc1edc19bcheckoutParams
Params provided by the frontend element of the provider. Can contain sensible data
object
Example
{ "paymentIntentId": "pi_test_23tz4hrdpgjseroh"}sourceIp
IP address from the client where the order was placed. It can be a IPv4 or IPv6 address
string
Example
85.45.62.2userAgent
The UserAgent string from headers of the incoming request.
string | null
Example
Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0domain
The domain from which order came.
string | null
Example
www.mydomain.complatform
The platform from which the order came.
string
Example
engageos
Operation system of the source device
string
Example
iosResponses
Section titled “Responses”Checkout success
Media typeapplication/json
Merchant of order not found
Media typeapplication/json
default
Section titled “default”Unexpected error
Media typeapplication/json
object
code
Machine readable error code
string
message
required
Human readable error code
string
Example
{ "code": "internal.database", "message": "Internal Database Error"}
