DropKey exposes a REST API for compatible software. Developers integrating a WordPress plugin sold through DropKey can use the reusable PHP client in:
sdk/dropkey-license-client.php
The API base URL is (replace YOUR-DOMAIN with the actual hostname of the DropKey installation):
https://YOUR-DOMAIN/wp-json/dropkey/v1
Available API operations
| Method |
Endpoint |
Purpose |
| POST |
/licenses/activate |
Activate a license for a website |
| POST |
/licenses/deactivate |
Deactivate a website |
| POST |
/licenses/validate |
Validate a license |
| POST |
/products/{product-slug}/updates |
Check for a newer published release |
| GET |
/downloads/{token} |
Retrieve a protected ZIP using a valid token |
Checkout and provider webhook endpoints are also exposed for DropKey's own storefront and payment workflows; they are not substitutes for the licensing operations above.
Reusable PHP client
Copy the SDK file into the plugin you distribute through DropKey, then include it from your plugin.
require_once plugin_dir_path( __FILE__ ) . 'includes/dropkey-license-client.php';
$dropkey = new DropKey_License_Client(
'https://your-dropkey-site.example',
'your-product-slug'
);
$result = $dropkey->activate( $license_key );
if ( is_wp_error( $result ) ) {
// Handle a connection or API error.
// A transport error does not prove the license is invalid.
}
Use the actual SDK path and product slug in your plugin. The example assumes that you have copied the SDK to the shown includes directory. The client requires HTTPS, keeps TLS certificate verification enabled, disables redirects for API calls, and does not embed an administrator secret.
Activation request
POST /licenses/activate
JSON fields:
license_key: The customer's license key.
site_url: The website URL being activated.
Deactivation request
POST /licenses/deactivate
JSON fields:
license_key: The customer's license key.
site_url: The website URL being deactivated.
Validation request
POST /licenses/validate
JSON fields:
license_key: The license key to validate.
site_url: Optional website URL for validation against a particular site.
Update check request
POST /products/{product-slug}/updates
JSON fields:
license_key: The license key.
site_url: The website making the request.
current_version: The version currently installed.
When a newer eligible published release is available, the response can include the version, release notes, a protected download URL, and its expiration time.
Important developer notes
- Handle transport errors separately from invalid-license responses.
- Do not treat a network outage as proof that a license is invalid.
- Do not expose license keys in public logs or frontend code unnecessarily.
- Use HTTPS for all requests.
- Test activation, deactivation, validation, and update checks in a staging environment.
Automatic updates notice
DropKey has a licensing/update-check API and a reusable PHP client. Full integration with the WordPress Plugins update screen is not currently implemented. Developers should not assume that publishing a release automatically installs it on customers' websites.