Internal Helper File Integration
You can programmatically control and automate LicenseBox from your order management system or any other scripting tool by utilizing the internal helper file, which you can generate from within your LicenseBox administration panel.
Note: Please be advised that helper files are currently only available for the PHP programming language. However, you can access the comprehensive API documentation here which contains all API endpoints, parameters, and cURL snippets to aid you in making requests from your non-PHP applications.
Getting Started
Use this checklist to integrate the internal helper file quickly and safely.
-
Create an internal API key: In LicenseBox admin, go to API Settings, create a key of type Internal, and allow only the endpoints your backend needs.
-
Generate internal helper file: Go to Generate > Internal Helper File, select API key and language, generate, and copy the code.
-
Save file in your backend: Store the generated code as
includes/lb_internal_helper.php(or your preferred path). -
Load helper in your bootstrap: In your backend bootstrap or entry file, add:
require_once 'includes/lb_internal_helper.php'; $api = new LicenseBoxInternalAPI();
Note: The helper only exposes methods. Your code decides when and how to call them.
-
Call helper methods from backend events: For example, create product/license when an order is paid, block/unblock on fraud/refund, and update support/expiry from your billing flow.
-
Example: Add product
$res = $api->add_product("Test Product"); echo $res['message']; -
Example: Create license
$data = array( 'license_type' => 'Regular License', 'invoice_number' => '#98765', 'client_name' => 'John Snow', 'client_email' => 'jon@example.com', 'comments' => null, 'licensed_ips' => null, 'licensed_domains' => null, 'support_end_date' => null, 'updates_end_date' => null, 'expiry_date' => '2030-01-25 10:00', 'license_uses' => null, 'license_parallel_uses' => 1 ); $res = $api->create_license($product_id, $data); echo $res['message'];
-
Example: Block license
$res = $api->block_license($license_code); echo $res['message'];
-
Debug integration issues: Set
LB_API_DEBUGtotrueinlb_internal_helper.php, reproduce the request, and inspect the returned response.
For complete method behavior, parameters, and API responses, refer to
Swagger API documentation.
Current schema version: 1.7.2.
API Onboarding Path
Use this short path to validate internal automation before connecting it to live billing events.
- Create Internal API key with only required endpoints enabled.
- Connectivity check: call
POST /check_connection_int. - Create product (if needed): call
POST /add_product. - Create license: call
POST /create_license. - Read/update lifecycle: call
POST /get_licensethenPOST /edit_license.
Open the Internal API section in Swagger for request/response examples.
Internal Helper Method Mapping
Use this mapping to wire common backend events to helper methods and API endpoints.
| Backend Event | Helper Method | Swagger Endpoint | Expected Result |
|---|---|---|---|
| New order paid | create_license() |
POST /create_license |
New license key is generated and returned |
| Order/license metadata updated | edit_license() |
POST /edit_license |
License fields are updated (expiry/support/limits, etc.) |
| Support lookup | get_license() |
POST /get_license |
Full license details are returned for diagnostics |
| Fraud/refund action | block_license() |
POST /block_license |
License is blocked for future validations |
| Appeal/reinstatement approved | unblock_license() |
POST /unblock_license |
License is unblocked and can be used again |
Swagger quick links: create_license, edit_license, get_license, block_license, unblock_license.
‹ Previous (Client Helper File Integration) Next (FAQs) ›
Please mail us your feedback at support@licensebox.app
Follow us on twitter at @LicenseBoxApp for future product updates