Create checkout session
curl --request POST \
--url https://api.quickshops.app/v1/checkout/session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cartId": "<string>",
"productId": "<string>",
"quantity": 50,
"successUrl": "<string>",
"cancelUrl": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cartId: '<string>',
productId: '<string>',
quantity: 50,
successUrl: '<string>',
cancelUrl: '<string>'
})
};
fetch('https://api.quickshops.app/v1/checkout/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.quickshops.app/v1/checkout/session"
payload = {
"cartId": "<string>",
"productId": "<string>",
"quantity": 50,
"successUrl": "<string>",
"cancelUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cartId: '<string>',
productId: '<string>',
quantity: 50,
successUrl: '<string>',
cancelUrl: '<string>'
})
};
fetch('https://api.quickshops.app/v1/checkout/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"url": "<string>",
"sessionId": "<string>"
}
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}Create checkout session
Start a Stripe Checkout session for a cart or buy-now product.
POST
/
v1
/
checkout
/
session
Create checkout session
curl --request POST \
--url https://api.quickshops.app/v1/checkout/session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cartId": "<string>",
"productId": "<string>",
"quantity": 50,
"successUrl": "<string>",
"cancelUrl": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cartId: '<string>',
productId: '<string>',
quantity: 50,
successUrl: '<string>',
cancelUrl: '<string>'
})
};
fetch('https://api.quickshops.app/v1/checkout/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.quickshops.app/v1/checkout/session"
payload = {
"cartId": "<string>",
"productId": "<string>",
"quantity": 50,
"successUrl": "<string>",
"cancelUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cartId: '<string>',
productId: '<string>',
quantity: 50,
successUrl: '<string>',
cancelUrl: '<string>'
})
};
fetch('https://api.quickshops.app/v1/checkout/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"url": "<string>",
"sessionId": "<string>"
}
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}Authorizations
Headless API key (qk_...). Pro plan required.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Required range:
1 <= x <= 99Absolute https URL Stripe redirects to after successful payment. May include {CHECKOUT_SESSION_ID}. Defaults to the hosted Quickshops success page.
Absolute https URL Stripe redirects to if the customer cancels. Defaults to the hosted Quickshops storefront.
Response
Response for status 200
Show child attributes
Show child attributes
Was this page helpful?
⌘I