Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions docs/development/license-validation/importing-licenses.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!--
This source file is part of the open source project
ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide)

@link https://expressionengine.com/
@copyright Copyright (c) 2003-2024, Packet Tide, LLC (https://packettide.com)
@license https://expressionengine.com/license Licensed under Apache License, Version 2.0
-->

# Importing a License via the API

[TOC]

Importing a license into our system allows add-on developers to ensure that users who purchased their add-ons outside of our platform can validate their licenses. This documentation outlines the process for add-on developers to import licenses into our system.

## Requesting API Key

Before importing licenses, add-on developers must contact us to request an API key. The API key is necessary to authenticate requests made to our system. Once the API key is obtained, developers can proceed with the import process.

## API Endpoint

Add-on developers can import licenses by making a JSON POST request to the following API endpoint:

```
POST https://expressionengine.com/vendor-api/import-license
```

## Required Data

The following data fields are required when making a POST request to import a license:

- `auth_key`: This is the API key obtained from us. It is required for authentication purposes.
- `addon_shortname`: The short name or identifier of the add-on for which the license is being imported.
- `customer_name`: The name of the customer who purchased the license.
- `email`: The email address of the customer.
- `license_key`: The license key associated with the purchase.
- `purchase_date`: The date when the license was purchased (format: 'YYYY-MM-DD').
- `expiration_date`: The expiration date of the license (format: 'YYYY-MM-DD').

## Optional Fields

In addition to the required fields, developers may include optional fields in the POST request:

- `notes`: Any additional notes or information related to the license.
- `price`: The price at which the license was purchased.

## Example Request

```json
{
"auth_key": "your_api_key",
"addon_shortname": "your_addon_shortname",
"customer_name": "John Doe",
"email": "john.doe@example.com",
"license_key": "ABC123XYZ",
"purchase_date": "2024-01-15",
"expiration_date": "2025-01-15",
"notes": "This is a test license import.",
"price": 49.99
}
```

## Response

Upon successful import, the API will return a response indicating the success status. If there are any errors or issues with the import request, appropriate error messages will be returned along with the response.
42 changes: 42 additions & 0 deletions docs/development/license-validation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
This source file is part of the open source project
ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide)

@link https://expressionengine.com/
@copyright Copyright (c) 2003-2024, Packet Tide, LLC (https://packettide.com)
@license https://expressionengine.com/license Licensed under Apache License, Version 2.0
-->

# License Validation

[TOC]

License validation is a feature designed to ensure that users of add-ons purchased through our platform comply with licensing agreements. It serves to remind users to purchase a license if they have forgotten to do so, facilitates add-on license renewal, and provides recommendations for license purchases to users who do not have one.

## Benefits
- Reminder for License Purchase: Users who mistakenly forget to buy a license are notified through the control panel, prompting them to purchase a valid license. We also recommend licenses to users in their accounts on expressionengine.com if applicable.
- Renewal Add-On Sales: Developers can create renewal add-on sales to keep add-on licenses up-to-date, ensuring continued support and updates.

## Application Process
Third-party developers selling add-ons on our platform can enable license validation through their accounts on expressionengine.com. The following outlines the steps for enabling license validation:

- Log in to your account on expressionengine.com.

- Navigate to the "Manage Add-Ons" section.

- Under the "Your Add-Ons" section, click on "Apply to enable license validation" for the desired add-on.

## Terms and Conditions
Before enabling license validation for an add-on, developers are required to agree to the following terms:

- Import Existing Sales: Developers must import all existing sales that occurred outside of expressionengine.com. This ensures that users who purchased the add-on elsewhere can validate their licenses. Failure to import all licenses may result in users seeing the add-on as "unlicensed" in their control panel. Existing sales can be imported by emailing a CSV to us, or through our [license import API.](development/license-validation/importing-licenses.md)

- Customer Notification: Developers must send an email to their customers informing them of the requirement to tie their licenses to an ExpressionEngine site on expressionengine.com. Users must log in to their accounts and attach their add-on purchases to a site license in the "Licenses" section. Failure to attach the license may result in the add-on appearing as "unlicensed" in their control panel.

- Frontend Disruption: License validation must not be used in a manner that disrupts the frontend of a website. Any visible impact on the frontend resulting from license validation is deemed inappropriate and against the agreed-upon use.

## Approval Process

Once the application for license validation is submitted, it will be reviewed by our team. The request may be approved or denied based on adherence to the outlined terms and conditions.

By adhering to the application process and terms outlined above, developers can enable license validation for their add-ons, ensuring compliance with licensing agreements and providing a seamless experience for users.
6 changes: 6 additions & 0 deletions docs/toc_sections/_advanced_usage_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,12 @@
href: development/guidelines/view-php-syntax.md
- name: Debugging
href: development/debugging.md
- name: License Validation
items:
- name: Overview
href: development/license-validation/index.md
- name: Importing Licenses Through the API
href: development/license-validation/importing-licenses.md
- name: v3 Add-on Migration
href: development/v3-add-on-migration.md
- name: v4 Add-on Migration
Expand Down