Confirm a paid Checkout session (API key)
curl --request POST \
--url https://api.trysnapit.com/api/v1/credits/checkout/confirm \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "cs_test_a1b2c3"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sessionId: 'cs_test_a1b2c3'})
};
fetch('https://api.trysnapit.com/api/v1/credits/checkout/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trysnapit.com/api/v1/credits/checkout/confirm"
payload = { "sessionId": "cs_test_a1b2c3" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"applied": true,
"credits": 100,
"balance": 142,
"creditCostPerInvoice": 1
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}Programmatic API
Confirm a paid Checkout session (API key)
After the customer pays at Stripe, call this with the Checkout sessionId to credit the workspace immediately. Idempotent — safe to retry. The Stripe webhook also fulfills the same purchase.
POST
/
api
/
v1
/
credits
/
checkout
/
confirm
Confirm a paid Checkout session (API key)
curl --request POST \
--url https://api.trysnapit.com/api/v1/credits/checkout/confirm \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "cs_test_a1b2c3"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sessionId: 'cs_test_a1b2c3'})
};
fetch('https://api.trysnapit.com/api/v1/credits/checkout/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trysnapit.com/api/v1/credits/checkout/confirm"
payload = { "sessionId": "cs_test_a1b2c3" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"applied": true,
"credits": 100,
"balance": 142,
"creditCostPerInvoice": 1
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}Authorizations
Bearer sk_live_… (include the Bearer prefix)
Body
application/json
Stripe Checkout Session id from the success redirect
Example:
"cs_test_a1b2c3"
Response
Payment confirmed and balance returned

