# ProInvoice — License & Activation Guide

**Purpose:** Explain—in plain language—how **CodeCanyon purchase**, **external license verification**, and **software activation** work together.

---

## Table of contents

1. [Important concepts](#1-important-concepts)  
2. [License activation flow (buyer journey)](#2-license-activation-flow-buyer-journey)  
3. [Step-by-step: Envato purchase code](#3-step-by-step-envato-purchase-code)  
4. [Step-by-step: Author license website](#4-step-by-step-author-license-website)  
5. [Domain binding — what it means](#5-domain-binding--what-it-means)  
6. [What you enter in the installer](#6-what-you-enter-in-the-installer)  
7. [Common license problems](#7-common-license-problems)  
8. [FAQ highlights](#8-faq-highlights)  

---

## 1. Important concepts

### Two different codes

| Item | What it is | Where you use it |
|------|------------|------------------|
| **Envato purchase code** | Proof that you bought the item on CodeCanyon | Author’s **license / activation website** |
| **Product activation license key** | A key **generated by the author’s system** after verifying your purchase | **Installer Stage 3** inside ProInvoice |

> **Beginner-friendly summary:**  
> Your **Envato purchase code** is your **proof of purchase**.  
> The **activation key** generated from the author’s website is what **unlocks the installer** and ties the software to your **domain**.

### Why not paste the purchase code directly into the app?

Many CodeCanyon products use an **external license API** so the author can:

- Confirm the purchase is **valid** and **not refunded**  
- Bind the license to **your domain**  
- Support **renewals**, **transfers**, or **support entitlements**  
- Reduce **piracy** and **code sharing**  

The exact URL of the license portal is provided in your **download readme**, **item description**, or **documentation PDF** from the author. **Use only the official link** from the author.

---

## 2. License activation flow (buyer journey)

```
┌─────────────────────┐
│ Buy on CodeCanyon   │
└──────────┬──────────┘
           ▼
┌─────────────────────┐
│ Copy purchase code  │
└──────────┬──────────┘
           ▼
┌─────────────────────────────┐
│ Open author’s license site  │
└──────────┬──────────────────┘
           ▼
┌─────────────────────────────┐
│ Enter: purchase code,       │
│        email,               │
│        domain               │
└──────────┬──────────────────┘
           ▼
┌─────────────────────────────┐
│ Author’s system verifies    │
│ with Envato / internal DB   │
└──────────┬──────────────────┘
           ▼
┌─────────────────────────────┐
│ You receive activation key  │
└──────────┬──────────────────┘
           ▼
┌─────────────────────────────┐
│ Paste key in Installer      │
│ Stage 3                     │
└──────────┬──────────────────┘
           ▼
┌─────────────────────────────┐
│ Installation continues      │
└─────────────────────────────┘
```

[Insert Screenshot: License Portal — Generate Key]

---

## 3. Step-by-step: Envato purchase code

### Where to find your purchase code

1. Log in to **codecanyon.net**.  
2. Click your **avatar** → **Downloads**.  
3. Find **ProInvoice** (or the item name).  
4. Click **License certificate & purchase code** (wording may vary) or the **download** area that shows the code.  
5. Click **copy** or highlight the **purchase code** and copy it.  

> **Tip:** The purchase code is a **string of letters and numbers**. Copy it **exactly**—no extra spaces before or after.

[Insert Screenshot: CodeCanyon Purchase Code Location]

### Keep this private

Your purchase code is **confidential**. Do not post it in public forums, screenshots, or social media.

---

## 4. Step-by-step: Author license website

> **Replace the URL below with the real URL from your download package / item page.**

1. Open the author’s **license activation** website (official link only).  
2. If you have an account, **log in** or **register** with a valid **email** you control.  
3. Choose **Activate**, **Generate License**, or similar.  
4. Paste your **Envato purchase code**.  
5. Enter your **email address** (used for support and license recovery).  
6. Enter your **domain name** exactly as visitors will use it, for example:  
   - `billing.yourbusiness.com`  
   - `yourbusiness.com`  
7. Submit the form.  

### After successful verification

- The system shows a **product activation license key** (long string).  
- **Copy** this key and store it in a **password manager** or secure note.  
- You will paste it during **Installer Stage 3**.  

### If verification fails

Jump to **[Common license problems](#7-common-license-problems)** below.

---

## 5. Domain binding — what it means

### One installation, one primary domain (typical)

Most marketplace licenses are intended for **one production installation** at a time, tied to the **domain you registered** on the license portal.

Examples of what “domain” might mean for validation:

- **Production:** `https://yourdomain.com`  
- **WWW vs non-WWW:** Some systems treat `www` and non-`www` differently — use the form that matches how you **installed** the software.  
- **Subdomains:** If you install on `app.yourdomain.com`, register **that** subdomain if the author’s portal asks for the full host.  

> **Warning:** Activating on a **temporary URL** (e.g. `http://192.168.x.x` or a staging URL) may consume or confuse your license. Use **staging** only if the author documents how to do it.

### Moving to a new server or domain

See **[FAQ.md](FAQ.md)** — usually you must:

- **Deactivate** or **transfer** the old binding on the author’s portal, **or**  
- **Contact support** with proof of purchase  

Do **not** assume you can clone the site to a new domain without updating the license.

---

## 6. What you enter in the installer

### Installer Stage 3 (typical)

| Field | What to enter |
|-------|----------------|
| **License / activation key** | The **generated key** from the author’s website |
| **Domain** (if asked again) | Must match the licensed domain |

When activation succeeds:

- The installer unlocks **Stage 4** (demo data) or **completion**.  
- The admin panel may show **License Status** with expiry or validation info (if the product includes it).  

[Insert Screenshot: Installer Stage 3 Filled]

---

## 7. Common license problems

### “Invalid purchase code”

**Likely causes:**

- Typo or **extra space** when pasting  
- Wrong item purchased  
- Refund or **chargeback** voided the purchase  
- Pasting **activation key** into the **purchase code** field on the wrong site  

**What to do:**

1. Re-copy the purchase code from Envato **Downloads**.  
2. Paste into **Notepad** first to strip formatting, then copy again.  
3. Try another browser or incognito window.  
4. Contact **author support** with proof of purchase (Envato receipt).  

---

### “Already used on another domain”

**Likely causes:**

- License was generated for **domain A**; you are installing on **domain B**  
- Old staging server still **bound**  
- Previous developer activated without handing over the portal access  

**What to do:**

1. Log in to the **author license portal** and check **active activations**.  
2. **Deactivate** old/staging domains if the portal allows.  
3. If no self-service option, email support: include **purchase code** (privately), **old domain**, **new domain**, and **reason for move**.  

---

### “Copied with spaces”

**Symptom:** Key looks right but fails.

**Fix:**

- Paste into a plain text editor.  
- Remove **leading/trailing spaces** and **line breaks**.  
- Ensure you did not copy a **bullet** or **dash** from a PDF.  

---

### “Wrong domain submitted”

**Symptom:** Works on staging, fails on production (or vice versa).

**Fix:**

- Generate or **re-bind** license for the **exact host** in the browser address bar (including `www` if used).  
- Avoid mixing **HTTP** and **HTTPS** if the validator is strict—prefer **HTTPS**.  

---

### Internet / firewall / SSL issues

**Likely causes:**

- Server **cannot reach** the author’s license API (outbound firewall)  
- **cURL** blocked  
- **SSL certificate** problems on your server  

**What to do:**

1. Ask host to confirm **outbound HTTPS** is allowed.  
2. Ensure server date/time is correct (**NTP**).  
3. See **[TROUBLESHOOTING.md](TROUBLESHOOTING.md)**.  

---

### Installer says valid but admin shows “invalid” later

**Likely causes:**

- Domain **DNS** changed  
- **Cron** or background re-validation failed  
- **Clock** skew on server  

**What to do:**

1. Open **License Status** in admin (if available) → **Refresh**.  
2. Confirm domain and SSL.  
3. Contact support with **screenshot** of the message.  

---

## 8. FAQ highlights

| Question | Short answer |
|----------|--------------|
| Is purchase code the same as activation key? | **Usually no.** Purchase code → author site → **activation key** → installer. |
| One license, multiple domains? | **Typically no** for production; see your license terms on CodeCanyon. |
| Lost my activation key? | Log in to **author license portal** or contact support with purchase proof. |
| Refunded item | License **stops working**; you must **uninstall**. |

More answers: **[FAQ.md](FAQ.md)**.

---

## Related documents

- **[INSTALLATION_GUIDE.md](INSTALLATION_GUIDE.md)** — Full install steps  
- **[TROUBLESHOOTING.md](TROUBLESHOOTING.md)** — Technical errors  
- **[SECURITY.md](SECURITY.md)** — Protecting credentials  

---

*If any URL or field name in this guide differs in your build, follow the on-screen labels in the product and the author’s official readme.*

*End of License Guide*
