Create a Lemon Squeezy checkout session
curl --request POST \
--url https://api.sitespy.app/api/v1/billing/checkout \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"plan": "starter",
"billing_period": "monthly",
"success_url": "https://sitespy.app/dashboard/billing?checkout=success"
}
'import requests
url = "https://api.sitespy.app/api/v1/billing/checkout"
payload = {
"plan": "starter",
"billing_period": "monthly",
"success_url": "https://sitespy.app/dashboard/billing?checkout=success"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan: 'starter',
billing_period: 'monthly',
success_url: 'https://sitespy.app/dashboard/billing?checkout=success'
})
};
fetch('https://api.sitespy.app/api/v1/billing/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"checkout_url": "https://checkout.lemonsqueezy.com/..."
}Billing
Create a Lemon Squeezy checkout session
Creates a hosted checkout URL for upgrading to a paid plan.
POST
/
billing
/
checkout
Create a Lemon Squeezy checkout session
curl --request POST \
--url https://api.sitespy.app/api/v1/billing/checkout \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"plan": "starter",
"billing_period": "monthly",
"success_url": "https://sitespy.app/dashboard/billing?checkout=success"
}
'import requests
url = "https://api.sitespy.app/api/v1/billing/checkout"
payload = {
"plan": "starter",
"billing_period": "monthly",
"success_url": "https://sitespy.app/dashboard/billing?checkout=success"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan: 'starter',
billing_period: 'monthly',
success_url: 'https://sitespy.app/dashboard/billing?checkout=success'
})
};
fetch('https://api.sitespy.app/api/v1/billing/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"checkout_url": "https://checkout.lemonsqueezy.com/..."
}Authorizations
API key for authentication. You can find your API key in the Site Spy dashboard under Settings → API.
Body
application/json
Response
Checkout URL
Example:
"https://checkout.lemonsqueezy.com/..."

