β‘Quickstart
Welcome! If you're here, it means youβre ready to get your first license running with DevPayr β and honestly, that makes both of us excited.
This Quickstart guide will walk you through everything you need to move from βWhat is DevPayr?β to βOh wow, itβs working!β in just a few steps.
It is seamless, no complex jargon and no silent judgment if you copyβpaste everything here. Letβs dive in. π
π― What Youβll Achieve in This Quickstart
By the end of this page, you will have:
Created your first Project
Generated API Keys
Issued a License
Validated the license from your code
And confirmed DevPayr is working for your integration
Think of this as your first βhello worldβ moment β but with licensing superpowers.
Step 1: Create Your First Project
Projects are the foundation of DevPayr. A project represents any software, app, theme, website, SaaS, or tool you want to protect.
To create your first project:
Log into your DevPayr dashboard
Go to Projects
Click New Project
Give it a name (e.g., βFashionStore SaaSβ, βClient Dashboard 1.0β, βMy Amazing Appβ)
Fill-out the form according to your need for the project - default redirect url, project webhook url, webhook secret, etc
Hit Create Project
Thatβs it. Your project now exists in the DevPayr universe.
Donβt overthink the project name. You can always rename it later. The licensing engine doesnβt judge your naming skills.
The assumption of this step is that you already have an account with DevPayr and enrolled in a package. If that is not so, create one here


Step 2: (Optional) Generate an API Key
API keys in DevPayr are completely optional β you only need them if you plan to perform extra operations beyond simply validating a license. For example: creating licenses programmatically, suspending licenses, updating metadata, or pulling project details from your backend.
If all you need is license validation, the License Key can do that on its own. However, if you enjoy control (like most developers and agencies do), an API key is your best friend.
Hereβs how to create one:
In the sidebar menu, click API Keys
Click Create New Key
Under Attach to Project, select the project this key should belong to
Or leave it as Global Key (if your subscription plan allows global keys)
Choose the Scopes you want this API key to have
Scopes define what this key is allowed to do
For example: read licenses, create licenses, manage environments, etc.
Think of scopes as permission levels β give the key only what it needs
(Optional) Set an Expiration Date
Helpful when giving temporary access to teammates, contractors, or test setups
Leave it blank if you want the key to live indefinitely
Click Create, then copy the key and store it somewhere secure
π Tip: Scopes help you avoid giving a key βadmin-level powersβ when all it needs is βread-only access.β Only give a key the abilities youβre comfortable losing sleep over.


Step 3: Create Your First License
To issue a license for your project:
Navigate to Projects
Click View on the project
Inside the project dashboard, click New License
Fill out the license form (fields shown in the screenshot)
Click Create License
Thatβs it β your new license key will be generated.

π Understanding the License Fields
Use these fields to configure how your license behaves:
License Title
Internal name to help you identify and organize your licenses
Doesnβt affect functionality β just your sanity
Restrict to Domain (Optional)
If your project already has domains added, you can lock the license to one domain
Only that domain will be able to use the license
Leave unselected to allow usage on multiple domains (based on limits below)
π‘ Tip: Use this when delivering client projects that must run on one approved domain only.
Expiration Date (Optional)
Set a date if you want the license to expire automatically
Leave blank for lifetime licenses
β³ Tip: Perfect for trials, subscriptions, or βrenewal pendingβ clients.
π Domain & Usage Controls
These optional fields help prevent license abuse:
Max Domains
Total number of unique domains that can use this license
Ideal for product licenses that allow multiple installations (e.g., 3 sites)
Max Subdomains
Number of subdomains allowed per domain
Useful for SaaS dashboards or multi-subdomain client setups
Max Usage / Day
Limits how many API/SDK validations can occur within 24 hours
Good for trial versions, rate-limited APIs, or high-traffic sanity checks
π Tip: These limits protect your work from being spread across the entire internet by βthat one enthusiastic user.β
Mark as Test License
Marks the license as non-production
Relaxed validation rules for developers and staging environments
Helps avoid domain/IP restrictions during development
Once you submit the form, DevPayr will generate a license key, for example:
Youβll use this key in your app to validate whether the project should run.
Step 4: Validate the License (and optional API Key)
Once you have a license, youβll want to validate it β either using just the License Key (simplest) or using a full API Key + License Key (for backend control). You can do this using any of DevPayrβs official SDKs β or even via raw HTTP (cURL). Real code examples live in the SDK repos (see links below).
SDKs & Repos
Node.js SDK β devpayr-node-sdk
PHP SDK β devpayr-php-sdk
Python SDK β devpayr_python_sdk
Frontend JS SDK β devpayr-frontend-sdk
Use these repos to view full, up-to-date examples and advanced usage.
Validate with License Key Only
Use this method if you simply want to confirm that a license is valid (expiration, domain/device restrictions, etc.). No API key required. Ideal for frontend, themes, plugins, or simple SaaS license checks.
Example :
Unlike backend SDKs, the frontend SDK gives you complete freedom to structure your validation code however you want. You can rename the configuration object, obscure the keys, or blend it naturally into your existing scripts β making it harder for users to simply βremove the licensing code.β
For example, all of the following are valid:
Validate with API Key
When you introduce an API Key into your integration, DevPayr opens up a whole new level of functionality. Youβre no longer limited to validating licenses β you can now interact with DevPayr programmatically using the SDKβs built-in service classes.
In short:
License Key β βIs this copy allowed to run? Fetch injectables if allowedβ
API Key β βI want full control β give me everything.β
With an API Key, you can:
Manage licenses
Manage domains
Fetch or upload injectables
Interact with payments
Query or modify project details
Bypass certain limits by using authenticated endpoints
This is the mode for backend systems, agency automation, DevOps tooling, build pipelines, and admin workflows.
Node.js Example (Using API Key + License Key)
Once bootstrapped with an API key, you gain access to all SDK service classes:
Available Service Methods (Node.js)
projects()
list(), create(), show(), update(), delete()
licenses()
list(), show(), create(), revoke(), reactivate(), delete()
domains()
list(), create(), show(), update(), delete()
injectables()
list(), create(), show(), update(), delete(), stream()
payments()
checkWithLicenseKey(), checkWithApiKey()
π‘ Tip: With an API key, your SDK becomes a full DevPayr client β you can automate entire workflows without touching the dashboard.
βοΈ SDK Configuration Options
Below are the configuration fields supported during bootstrap (Node.js version shown for clarity):
license
string
License key for validation (optional if using API key alone)
api_key
string
Your authenticated API key (project-scoped or global)
recheck
boolean
Skip cache and force fresh validation (default: true)
action
string
Optional identifier (e.g., "boot", "start", "verify")
timeout
number
Request timeout in ms (default: 1000)
per_page
number
For paginated listing (e.g., list licenses)
injectables
boolean
Auto-fetch injectables on validation
injectablesVerify
boolean
Verify HMAC signature of injectables
injectablesPath
string
Directory to save injectables
handleInjectables
boolean
Whether SDK should decrypt/store injectables
injectablesProcessor
function
Custom handler for injectables
invalidBehavior
string
'modal', 'redirect', 'log', or 'silent'
redirectUrl
string
URL to redirect if invalid
customInvalidMessage
string
Message to display/log for invalid license
customInvalidView
string
Custom HTML file for blocked access
onReady
function
Callback triggered after successful validation
domain
string
The domain your application is running on β or any unique identifier if itβs not on a normal domain (like localhost, a desktop app, or a mobile app), and can even be a custom identifier for each installation of your software.
π PHP & π Python SDKs
The PHP and Python SDKs follow the same pattern:
Bootstrap with your license key
Add api_key for advanced capabilities
Access service classes (projects, domains, licenses, payments, injectables)
They expose the same method structure as the Node.js SDK
For full examples:
PHP SDK β https://github.com/DevPayr/devpayr-php-sdk.git
Python SDK β https://github.com/Xultech-LTD/devpayr_python_sdk.git
These repos include real usage samples, class structures, helper functions, and best-practice integration flows.
π Important Warning
Never expose API keys in frontend applications. API keys give full access to your DevPayr account β treat them like your server credentials. Only use API keys on secure backend environments.
π For Full Examples
Visit the official SDK repositories for complete code samples, advanced flows, injectable handling, service interactions, and real-world usage patterns.
Raw HTTP Validation
If you prefer not to use an SDK, you can validate licenses and check payment status using DevPayrβs REST API.
All endpoints support two authentication modes:
License Key β runtime validation
API Key β project-level access
Both methods return the same structured JSON responses.
π Validating with a License Key (Runtime)
When validating using a license key, you can provide it using:
X-LICENSE-KEYheader (recommended)licensein the request bodylicenseas a query parameter
Mandatory Header
All raw HTTP requests must include:
This tells DevPayr which domain the running copy of your app belongs to.
Endpoint
POST /api/v1/project/has-paid
Example β Using Header
Example β Using Body
π Validating with an API Key (Project-Level)
When using an API key, the project is validated through authenticated, project-scoped endpoints.
Authentication Header
Mandatory Domain Header
β οΈ Do not call API-key endpoints from the frontend. API keys must remain private and secured on your backend.
Endpoint
GET /api/v1/project/{project_id}/has-paid
Example β Using API Key
π Example Response
π§ Summary
License Key
Runtime validation in deployed apps
X-LICENSE-KEY or body/query license
API Key
Backend integrations, admin tooling, full project access
X-API-KEY
Last updated