Get Started
- In Seller Dashboard → Edit Listing, turn on Enable Installer Verification, save, and copy the Product ID.
- Create a Sandbox key under Seller Dashboard → Developer → API Keys. Copy the key when it appears. The dashboard shows only its last eight characters after that.
- Ask your buyer to copy their purchase code from My Library → Order Details → Licence Certificate.
- Send the Product ID and purchase code to Codetsy from a server you control.
For software installed on a buyer’s server, have the installer call your verification service over HTTPS. Your service holds the seller key and calls Codetsy.
Verify a Purchase Code
Send a JSON POST request to /api/v1/licences/verify. Set Content-Type and Accept to application/json and pass your seller key in the Authorization: Bearer header.
product_id- Required integer. Use the Product ID shown in Edit Listing.
purchase_code- Required UUID string. Use the code from the licence certificate.
Before running this example, set MARKETPLACE_API_KEY and replace the sample Product ID and purchase code with your own values.
curl --request POST 'https://www.codetsy.com/api/v1/licences/verify' \
--header "Authorization: Bearer $MARKETPLACE_API_KEY" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{"product_id": 123, "purchase_code": "YOUR_PURCHASE_CODE"}'
Responses
A successful request returns 200 OK and the following fields. The values below are illustrative.
{
"valid": true,
"product_id": 123,
"licence": "standard",
"purchased_at": "2026-01-01T12:00:00+00:00",
"mode": "test"
}
licence is standard or extended. purchased_at is the payment timestamp in ISO 8601 format. mode is test or live. The API verifies orders for your own listings and returns licence and purchase details.
Errors
401invalid_api_key— check the key and seller account status.403installer_verification_disabled— turn on verification for the listing.404purchase_not_found— check that the product, payment environment, and purchase code match an active paid order. A refunded product purchase also returns this response.422- Check the response’s
errorsobject for missing or malformed fields. 429- Too many requests. Wait for the number of seconds in the
Retry-Afterheader.
The 401, 403 and 404 responses include valid: false and an error identifier. If a request times out or the server returns a 5xx response, let the buyer retry.
Sandbox & Live
- Sandbox
- Use a Sandbox key and a paid test purchase for your own listing from PayPal Sandbox or Stripe Test Mode.
- Live
- Use a Live key and a paid live purchase for your own listing.
The API verifies payments from the key’s environment. To replace a key, rotate it in the seller dashboard and update your server configuration. Rotation invalidates the old key immediately.
PHP Installer Example
This example shows how to prompt for a purchase code and handle the verification response. Run it on a server you control with PHP and cURL enabled. Configure it with your own listing and key.
MARKETPLACE_VERIFY_URL- The full verification endpoint. Use HTTPS when deployed.
MARKETPLACE_API_KEY- Your server-side Sandbox or Live key.
MARKETPLACE_PRODUCT_ID- Your listing’s Product ID.