Welcome to the CheckoutKeys API documentation. This API allows you to manage license keys for your digital product sold via stripe checkout. To use this API, you'll need an API key for authentication.
Get your API key in your dashboard by logging in here: CheckoutKeys Login and navigating to Settings.
The base URL for all API endpoints is
https://checkoutkeys.com
To authenticate your requests, include your API key in the request headers (x-api-key
) or as a query parameter (api_key
).
Endpoint: /api/licensekeys/validate?licenseKey=<license_key>
Method: GET
Request Parameters:
licenseKey
(required): The license key to validate.Response:
{ "status": "success", "message": "License key is valid." }
- 400 Bad Request: The license key is invalid or not associated with the connected account.
{ "status": "error", "message": "Invalid license key or not associated with the connected account." }
Endpoint: /api/licensekeys/status?licenseKey=<license_key>
Method: GET
Request Parameters:
licenseKey
(required): The license key to check.Response:
{ "status": "active", "message": "License key is active." }
{ "status": "deactivated", "message": "License key is deactivated." }
- 404 Not Found: The license key is not found for the provided connected account.
{ "status": "error", "message": "License key not found for the provided connected account." }
Endpoint: /api/licensekeys/activateDeactivate
Method: POST
Request Body:
{ "licenseKey": "LICENSE_KEY_HERE", "action": "activate" | "deactivate" }
Response:
{ "status": "success", "message": "License key activated." }
{ "status": "success", "message": "License key deactivated." }
- 400 Bad Request: Invalid action provided.
{ "status": "error", "message": "Invalid action provided." }
- 500 Internal Server Error: Failed to activate or deactivate the license key.
{ "status": "error", "message": "Failed to activate/deactivate license key." }
# Replace with your actual API key
apiKey="YOUR_API_KEY_HERE"
# License Key Validation (GET)
licenseKey="LICENSE_KEY_TO_VALIDATE"
validateUrl="https://checkoutkeys.com/api/licensekeys/validate?licenseKey=$licenseKey"
curl -X GET -H "x-api-key: $apiKey" $validateUrl
# Get License Key Status (GET)
licenseKeyToCheck="LICENSE_KEY_TO_CHECK"
statusUrl="https://checkoutkeys.com/api/licensekeys/status?licenseKey=$licenseKeyToCheck"
curl -X GET -H "x-api-key: $apiKey" $statusUrl
# Activate or Deactivate License Key (POST)
licenseKeyToActivateOrDeactivate="LICENSE_KEY_TO_ACTIVATE_OR_DEACTIVATE"
action="activate" # or "deactivate"
activateDeactivateUrl="https://checkoutkeys.com/api/licensekeys/activateDeactivate"
data="{"licenseKey": "$licenseKeyToActivateOrDeactivate", "action": "$action"}"
curl -X POST -H "Content-Type: application/json" -H "x-api-key: $apiKey" -d "$data" $activateDeactivateUrl
const fetch = require('node-fetch');
// Replace with your actual API key
const apiKey = 'YOUR_API_KEY_HERE';
const headers = { 'x-api-key': apiKey };
// License Key Validation (GET)
const licenseKey = 'LICENSE_KEY_TO_VALIDATE';
const validateUrl = `https://checkoutkeys.com/api/licensekeys/validate?licenseKey=${licenseKey}`;
fetch(validateUrl, { headers })
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error(error));
// Get License Key Status (GET)
const licenseKeyToCheck = 'LICENSE_KEY_TO_CHECK';
const statusUrl = `https://checkoutkeys.com/api/licensekeys/status?licenseKey=${licenseKeyToCheck}`;
fetch(statusUrl, { headers })
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error(error));
// Activate or Deactivate License Key (POST)
const licenseKeyToActivateOrDeactivate = 'LICENSE_KEY_TO_ACTIVATE_OR_DEACTIVATE';
const action = 'activate'; // or 'deactivate'
const activateDeactivateUrl = 'https://checkoutkeys.com/api/licensekeys/activateDeactivate';
const data = { licenseKey: licenseKeyToActivateOrDeactivate, action };
fetch(activateDeactivateUrl, {
method: 'POST',
headers,
body: JSON.stringify(data),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error(error));
// Replace with your actual API key
const apiKey = 'YOUR_API_KEY_HERE';
const headers = { 'x-api-key': apiKey };
// License Key Validation (GET)
const licenseKey = 'LICENSE_KEY_TO_VALIDATE';
const validateUrl = `https://checkoutkeys.com/api/licensekeys/validate?licenseKey=${licenseKey}`;
fetch(validateUrl, { headers })
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error(error));
// Get License Key Status (GET)
const licenseKeyToCheck = 'LICENSE_KEY_TO_CHECK';
const statusUrl = `https://checkoutkeys.com/api/licensekeys/status?licenseKey=${licenseKeyToCheck}`;
fetch(statusUrl, { headers })
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error(error));
// Activate or Deactivate License Key (POST)
const licenseKeyToActivateOrDeactivate = 'LICENSE_KEY_TO_ACTIVATE_OR_DEACTIVATE';
const action = 'activate'; // or 'deactivate'
const activateDeactivateUrl = 'https://checkoutkeys.com/api/licensekeys/activateDeactivate';
const data = { licenseKey: licenseKeyToActivateOrDeactivate, action };
fetch(activateDeactivateUrl, {
method: 'POST',
headers,
body: JSON.stringify(data),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error(error));
import requests
# Replace with your actual API key
api_key = 'YOUR_API_KEY_HERE'
headers = {'x-api-key': api_key}
# License Key Validation (GET)
license_key = 'LICENSE_KEY_TO_VALIDATE'
validate_url = f'https://checkoutkeys.com/api/licensekeys/validate?licenseKey={license_key}'
response = requests.get(validate_url, headers=headers)
print(response.json())
# Get License Key Status (GET)
license_key = 'LICENSE_KEY_TO_CHECK'
status_url = f'https://checkoutkeys.com/api/licensekeys/status?licenseKey={license_key}'
response = requests.get(status_url, headers=headers)
print(response.json())
# Activate or Deactivate License Key (POST)
license_key = 'LICENSE_KEY_TO_ACTIVATE_OR_DEACTIVATE'
action = 'activate' # or 'deactivate'
activate_deactivate_url = 'https://checkoutkeys.com/api/licensekeys/activateDeactivate'
data = {'licenseKey': license_key, 'action': action}
response = requests.post(activate_deactivate_url, json=data, headers=headers)
print(response.json())
require 'net/http'
require 'json'
# Replace with your actual API key
api_key = 'YOUR_API_KEY_HERE'
url = URI('https://checkoutkeys.com/api/licensekeys/validate?licenseKey=LICENSE_KEY_TO_VALIDATE')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request['x-api-key'] = api_key
response = http.request(request)
puts JSON.parse(response.read_body)
# Get License Key Status (GET)
url = URI('https://checkoutkeys.com/api/licensekeys/status?licenseKey=LICENSE_KEY_TO_CHECK')
request = Net::HTTP::Get.new(url)
request['x-api-key'] = api_key
response = http.request(request)
puts JSON.parse(response.read_body)
# Activate or Deactivate License Key (POST)
url = URI('https://checkoutkeys.com/api/licensekeys/activateDeactivate')
request = Net::HTTP::Post.new(url)
request['x-api-key'] = api_key
request['Content-Type'] = 'application/json'
license_key = 'LICENSE_KEY_TO_ACTIVATE_OR_DEACTIVATE'
action = 'activate' # or 'deactivate'
data = {'licenseKey': license_key, 'action': action}
request.body = data.to_json
response = http.request(request)
puts JSON.parse(response.read_body)