Use Code

Plan ahead for BFCM β€” unlock 26% OFF on all plans
slimited time
-
Days
-
Hours
-
Min
-
Sec

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

FeatureSDK MethodAPI Endpoint
List Licensesclient.Licenses.List(params)GET /licenses
Retrieve Licenseclient.Licenses.Get(key)GET /licenses/{key}
Create Licenseclient.Licenses.Create(data)POST /licenses
Update Licenseclient.Licenses.Update(key, data)PUT /licenses/{key}
Delete Licenseclient.Licenses.Delete(key)DELETE /licenses/{key}
Activate Licenseclient.Licenses.Activate(key, params)GET /licenses/activate/{key}
Reactivate Licenseclient.Licenses.Reactivate(key, params)GET /licenses/activate/{key}
Deactivate Licenseclient.Licenses.Deactivate(key, params)GET /licenses/deactivate/{key}
Validate Licenseclient.Licenses.Validate(key)GET /licenses/validate/{key}

βš™οΈ License Generators

FeatureSDK MethodAPI Endpoint
List Generatorsclient.Generators.List(params)GET /generators
Retrieve Generatorclient.Generators.Get(id)GET /generators/{id}
Create Generatorclient.Generators.Create(data)POST /generators
Update Generatorclient.Generators.Update(id, data)PUT /generators/{id}
Delete Generatorclient.Generators.Delete(id)DELETE /generators/{id}
Generate Keys (Pro)client.Generators.Generate(id, data)POST /generators/{id}/generate

πŸš€ Merchant & SaaS (Pro)

FeatureSDK MethodAPI Endpoint
Customer Licensesclient.Customers.GetLicenses(id)GET /customers/{id}/licenses
Products/Pingclient.Products.Ping(data)POST /products/ping
Products/Updateclient.Products.Update(key)GET /products/update/{key}
Download Productsclient.Products.DownloadURL(key)GET /products/download/latest/{key}
Retrieve Applicationclient.Applications.Get(id, params)GET /application/{id}
Download Applicationclient.Applications.DownloadURL(id, token)Signed application download URL

🌐 Public Client API

FeatureSDK MethodAPI Endpoint
Activatepub.Activate(body)POST /wp-json/lmfwc/v1/public/activate
Reactivatepub.Reactivate(body)POST /wp-json/lmfwc/v1/public/reactivate
Deactivatepub.Deactivate(body)POST /wp-json/lmfwc/v1/public/deactivate
Validatepub.Validate(body)POST /wp-json/lmfwc/v1/public/validate
Installed Checkpub.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.

PhaseClient SDK (This Free Repo)Pro Engine (Your WooCommerce Store)
PurposeConnects your Go application to your store.Handles orders, payments, and keys.
AvailabilityFree 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.

On this page

    Scroll to Top
    license Manager For WooCommerce
    Privacy Overview

    This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.