SellMyCode Developers
Licences

Purchase validation

Verify a purchase code a buyer gives you — the core of any licence system you run yourself. Returns the purchase details when the code belongs to one of your items and is still active; otherwise 404. Needs purchases:validate.

💡

Tip: Selling software that should check its own licence? Licence activation does it without a token and with signed answers — usually the better choice.

POST/api/purchases/validation
Parameter Type Description
purchase_code required string The code from the buyer (shown on their Purchases page and licence certificate)
curl -X POST https://sellmycode.net/api/purchases/validation \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "purchase_code=BUYER_PURCHASE_CODE"
⚠️

Warning: A 404 is returned for BOTH an unknown code and a refunded or blocked purchase — treat any non-200 as "licence invalid".

Was this page helpful?