Documentation
Getting Started
- Introduction
- Setup
- General Settings
- WooCommerce
- Tools
- Analytics Reports
- Dashboard
- License
- Generator
- Activations
- Applications
- Installed On
- API Logs
- WooCommerce Products
- Customer License Manager Flow
Integrations
For Developer
Go SDK
The Ultimate Go Licensing Engine for SaaS, Cloud, and Custom Software. Stop building custom Licensing APIs. This framework-agnostic SDK is the native Go bridge between your application and your License Manager for WooCommerce (Pro) backend.
π Accelerate Your Software Monetization
If you are building a SaaS, cloud service, or custom software, your focus should be on your productβnot building complex REST API integrations for licensing.
This SDK provides native Go access to the License Manager for WooCommerce (Pro) ecosystem. Integrate robust activation, validation, update, and download management into your software in minutes.
π‘οΈ Why Choose This SDK?
- Zero API Manual Coding: REST endpoints are mapped to simple Go methods.
- Framework Agnostic: Works with HTTP services, CLIs, workers, cloud applications, and standalone Go software.
- Secure Client API: Distributed applications can use the public API without shipping WooCommerce consumer secrets.
- Enterprise Ready: Designed for license management and multi-tier SaaS fulfillment.
π Professional API Support Matrix
This SDK provides native coverage for the License Manager for WooCommerce (Pro) REST APIs.
π Core Licensing
| Feature | SDK Method | API Endpoint |
|---|---|---|
| List Licenses | client.Licenses.List(params) | GET /licenses |
| Retrieve License | client.Licenses.Get(key) | GET /licenses/{key} |
| Create License | client.Licenses.Create(data) | POST /licenses |
| Update License | client.Licenses.Update(key, data) | PUT /licenses/{key} |
| Delete License | client.Licenses.Delete(key) | DELETE /licenses/{key} |
| Activate License | client.Licenses.Activate(key, params) | GET /licenses/activate/{key} |
| Reactivate License | client.Licenses.Reactivate(key, params) | GET /licenses/activate/{key} |
| Deactivate License | client.Licenses.Deactivate(key, params) | GET /licenses/deactivate/{key} |
| Validate License | client.Licenses.Validate(key) | GET /licenses/validate/{key} |
βοΈ License Generators
| Feature | SDK Method | API Endpoint |
|---|---|---|
| List Generators | client.Generators.List(params) | GET /generators |
| Retrieve Generator | client.Generators.Get(id) | GET /generators/{id} |
| Create Generator | client.Generators.Create(data) | POST /generators |
| Update Generator | client.Generators.Update(id, data) | PUT /generators/{id} |
| Delete Generator | client.Generators.Delete(id) | DELETE /generators/{id} |
| Generate Keys (Pro) | client.Generators.Generate(id, data) | POST /generators/{id}/generate |
π Merchant & SaaS (Pro)
| Feature | SDK Method | API Endpoint |
|---|---|---|
| Customer Licenses | client.Customers.GetLicenses(id) | GET /customers/{id}/licenses |
| Products/Ping | client.Products.Ping(data) | POST /products/ping |
| Products/Update | client.Products.Update(key) | GET /products/update/{key} |
| Download Products | client.Products.DownloadURL(key) | GET /products/download/latest/{key} |
| Retrieve Application | client.Applications.Get(id, params) | GET /application/{id} |
| Download Application | client.Applications.DownloadURL(id, token) | Signed application download URL |
π Public Client API
| Feature | SDK Method | API Endpoint |
|---|---|---|
| Activate | pub.Activate(body) | POST /wp-json/lmfwc/v1/public/activate |
| Reactivate | pub.Reactivate(body) | POST /wp-json/lmfwc/v1/public/reactivate |
| Deactivate | pub.Deactivate(body) | POST /wp-json/lmfwc/v1/public/deactivate |
| Validate | pub.Validate(body) | POST /wp-json/lmfwc/v1/public/validate |
| Installed Check | pub.Installed(body) | POST /wp-json/lmfwc/v1/public/installed |
π The Revenue Model: Free SDK + Pro Engine
The SDK is your client-side tool to bundle with your software. To serve as the merchant backend, you must have the Pro Engine.
| Phase | Client SDK (This Free Repo) | Pro Engine (Your WooCommerce Store) |
|---|---|---|
| Purpose | Connects your Go application to your store. | Handles orders, payments, and keys. |
| Availability | Free for developers. | Purchase Required Here |
π¦ 3-Minute Developer Quick Start
Step 1: Install the SDK
Install Go and verify your toolchain:
go version
Step 2: Add the SDK to your project
Clone the repository or download it into your project:
git clone https://bitbucket.org/YOUR_WORKSPACE/lmw-sdk-go.git cd lmw-sdk-go go mod tidy
Step 3: Initialize the client
Create a client with credentials stored in environment variables:
import (
"os"
lmw "github.com/licensemanager/lmw-sdk-go/sdk"
)
client, err := lmw.NewClient(lmw.Config{
StoreURL: os.Getenv("LMW_STORE_URL"),
ConsumerKey: os.Getenv("LMW_CONSUMER_KEY"),
ConsumerSecret: os.Getenv("LMW_CONSUMER_SECRET"),
})
if err != nil {
panic(err)
}
4. Basic Activation Pattern
activated, err := client.Licenses.Activate(
"ABCD-1234-EFGH-5678",
nil,
)
if err != nil {
panic(err)
}
// Store the activation token from activated for future validation.
_ = activated
API responses are returned as Go values. Always check the returned error before using a response.
ποΈ Application Integration
Server-side and Trusted Applications
Use the Pro REST API with WooCommerce consumer_key and consumer_secret credentials stored in environment variables, encrypted configuration, or a secrets manager.
Desktop, Mobile, and Distributed Software
Use the separate public client API with the product public key. Never ship the WooCommerce consumer secret in end-user software.
pub := lmw.NewPublicClient(os.Getenv("LMW_STORE_URL"))
result, err := pub.Validate(map[string]any{
"public_key": os.Getenv("LMW_PUBLIC_KEY"),
"license_key": "ABCD-1234-EFGH-5678",
"domain": "my-app.example.com",
})
π Get the Pro Merchant Engine Today
Unlock 100% of the SDK’s power by upgrading to the Pro edition of License Manager for WooCommerce.