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"
}Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Was this page helpful?
⌘I
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"
}