⚑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:

  1. Log into your DevPayr dashboard

  2. Go to Projects

  3. Click New Project

  4. Give it a name (e.g., β€œFashionStore SaaS”, β€œClient Dashboard 1.0”, β€œMy Amazing App”)

  5. Fill-out the form according to your need for the project - default redirect url, project webhook url, webhook secret, etc

  6. 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.

When creating a project, you can also add custom meta data in the form of simple key:value pairs. These values will automatically be included in all API responses and webhook events for that project.

This is especially useful if your project needs extra information β€” like a client ID, a billing reference, a plan code, or that one mysterious field your team insists is β€œvery important for reporting.” Whatever you add here stays attached to the project everywhere DevPayr communicates with your app.

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:

  1. In the sidebar menu, click API Keys

  2. Click Create New Key

  3. 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)

  4. 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

  5. (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

  6. Click Create, then copy the key and store it somewhere secure

Step 3: Create Your First License

To issue a license for your project:

  1. Navigate to Projects

  2. Click View on the project

  3. Inside the project dashboard, click New License

  4. Fill out the license form (fields shown in the screenshot)

  5. 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

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:

The frontend SDK is intentionally flexible β€” it lets you integrate licensing without making it obvious to the end user where your validation logic lives.

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)

Service
Methods

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):

Option
Type
Description

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:

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-KEY header (recommended)

  • license in the request body

  • license as 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

Mode
Use Case
How to Authenticate

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