Get checkout url
POST
/carts/{cartId}/checkoutUrl
const url = 'https://myshop.com/shopgate/v1/carts/example/checkoutUrl';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"userId":"example"}'};
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://myshop.com/shopgate/v1/carts/example/checkoutUrl \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "userId": "example" }'Generates a checkout URL for the app with a token. This URL opens in the app in a separate tab, logs the user in, and transfers the cart.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”cartId
required
string
Request Body
Section titled “Request Body”object
userId
required
string
Examplegenerated
{ "userId": "example"}object
userId
required
string
Examplegenerated
userId=exampleResponses
Section titled “Responses”Media typeapplication/json
object
output
required
object
url
required
A unified resource link.
string
expires
An optional date-time-string in the format ISO 8601 (YYYY-MM-DDTH:i:s.fZ). The URL does not expire if this field is not set. The returned timezone is always UTC (+00:00).
string
Example
{ "url": "https://myShop.com/checkout/shopgate?token=1234567890", "expires": "2018-05-30T23:09:20.481Z"}
