Welcome to the WPBay API documentation. If you don't use the official WPBay SDK, you can build your own integration with the WPBay API.
This guide provides detailed technical information on the available endpoints for managing license registrations, product updates, analytics, contact forms, and more.
1. License Registration Endpoint
https://wpbay.com/api/purchase/v1/register
HTTP Methods: GET POST
Purpose
Registers a license by verifying the purchase code, site URL, admin email, and API key. Performs ownership, sandbox, and license limit checks.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
purchase_code |
string | Unique purchase code from transaction | Yes |
site_url |
string | Site URL where product is installed | Yes |
admin_email |
string | Admin email | Yes |
api_key |
string | Your WPBay API key | Yes |
product_slug |
string | Product identifier | Yes |
wpbay_product_id |
int | Optional product ID verification | No |
developer_mode |
string ("0"|"1") | Enable sandbox mode | No |
secret_key |
string | Required if developer_mode=1 |
Conditional |
Example Request
POST https://wpbay.com/api/purchase/v1/register
Content-Type: application/json
{
"purchase_code": "ABC123-XYZ789-DEF456",
"site_url": "https://example.com",
"admin_email": "[email protected]",
"api_key": "your_api_key_here",
"product_slug": "my-awesome-plugin",
"developer_mode": "0"
}
Success Response
{
"success": true,
"plan_type": "wpbay",
"message": "License successfully registered."
}
Common Errors
missing_api_key→ 403invalid_api_key→ 403limit_reached→ License limit exceededdb_error→ 500 Internal Error
2. License Revocation Endpoint
https://wpbay.com/api/purchase/v1/revoke
HTTP Methods: GET POST
Purpose
Revokes a registered license using the purchase code and site URL. Supports developer sandbox mode for testing.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
purchase_code |
string | Unique purchase code | Yes |
site_url |
string | Site URL | Yes |
api_key |
string | API key for authentication | Yes |
product_slug |
string | Product identifier (required in developer mode) | Conditional |
developer_mode |
string ("0"|"1") | Enable sandbox mode | No |
secret_key |
string | Required if developer_mode=1 |
Conditional |
Example Request
POST https://wpbay.com/api/purchase/v1/revoke
Content-Type: application/json
{
"purchase_code": "ABC123-XYZ789-DEF456",
"site_url": "https://example.com",
"api_key": "your_api_key_here",
"product_slug": "my-awesome-plugin",
"developer_mode": "0"
}
Success Response
{
"success": true,
"message": "License successfully revoked for site URL: https://example.com"
}
Common Errors
missing_api_key→ 403invalid_api_key→ 403not_found→ 404 No license founddb_error→ 500
3. Purchase Code Registration Check Endpoint
https://wpbay.com/api/purchase/v1/registered
HTTP Methods: GET POST
Purpose
Checks if a purchase code is registered for a site URL. Supports sandbox mode.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
purchase_code |
string | Unique purchase code | Yes |
site_url |
string | Site URL | Yes |
api_key |
string | API key | Yes |
product_slug |
string | Product identifier (sandbox) | Conditional |
developer_mode |
string ("0"|"1") | Sandbox mode | No |
secret_key |
string | For sandbox | Conditional |
Example Request
POST https://wpbay.com/api/purchase/v1/registered
Content-Type: application/json
{
"purchase_code": "ABC123-XYZ789-DEF456",
"site_url": "https://example.com",
"api_key": "your_api_key_here",
"product_slug": "my-awesome-plugin",
"developer_mode": "0"
}
Success Response
{
"success": true,
"status": "exists",
"message": "This purchase code is registered."
}
Common Errors
missing_purchase_code→ 403not_found→ 400 Not registeredorder_not_available→ 400
4. Purchase Code Verification Endpoint
https://wpbay.com/api/purchase/v1/verify
HTTP Methods: GET POST
Purpose
Verifies the validity of a purchase code and returns order details. Supports sandbox mode.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
purchase_code |
string | Unique purchase code | Yes |
api_key |
string | API key | Yes |
product_slug |
string | Product identifier (sandbox) | Conditional |
developer_mode |
string ("0"|"1") | Sandbox mode | No |
secret_key |
string | For sandbox | Conditional |
Example Request
POST https://wpbay.com/api/purchase/v1/verify
Content-Type: application/json
{
"purchase_code": "ABC123-XYZ789-DEF456",
"api_key": "your_api_key_here",
"product_slug": "my-awesome-plugin",
"developer_mode": "0"
}
Success Response
{
"order_id": 1234,
"order_item_id": 5678,
"product_id": 910,
"product_title": "Your Product",
"license_number": "LIC-00123",
"order_status": "completed",
"order_date": "2025-02-26 14:30:00",
"billing_email": "[email protected]",
"customer_id": 1112
}
Common Errors
invalid_purchase_code→ 400not_allowed→ 400 Ownership mismatch
5. Product Update Endpoint
https://wpbay.com/api/update/v1/updates
HTTP Methods: POST
Purpose
Checks for product updates by comparing versions. Returns update details if available.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
purchase_code |
string | Purchase code | Yes |
product_slug |
string | Product slug | Yes |
product_id |
string | WPBay product ID | Yes |
version |
string | Current version | Yes |
site_url |
string | Site URL | Yes |
product_type |
string | Product type | Yes |
api_key |
string | API key | Yes |
developer_mode |
string ("0"|"1") | Sandbox | No |
secret_key |
string | For sandbox | Conditional |
Example Request
POST https://wpbay.com/api/update/v1/updates
Content-Type: application/json
{
"purchase_code": "ABC123-XYZ789-DEF456",
"product_slug": "my-awesome-plugin",
"product_id": "123",
"version": "1.0.0",
"site_url": "https://example.com",
"product_type": "plugin",
"api_key": "your_api_key_here",
"developer_mode": "0"
}
Success Response (Update Available)
{
"new_version": "1.2.0",
"download_url": "https://example.com/downloads/my_product_v1.2.0.zip",
"changelog": "Bug fixes and performance improvements.",
"release_date": "2025-03-01"
}
Common Errors
no_version_info→ 500invalid_code→ 400
6. Product Info Endpoint
https://wpbay.com/api/update/v1/info
HTTP Methods: POST
Purpose
Returns detailed product information after validation.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
purchase_code |
string | Purchase code | Yes |
product_slug |
string | Product slug | Yes |
product_id |
string | WPBay ID | Yes |
site_url |
string | Site URL | Yes |
product_type |
string | Type | Yes |
api_key |
string | API key | Yes |
developer_mode |
string ("0"|"1") | Sandbox | No |
secret_key |
string | For sandbox | Conditional |
Example Request
POST https://wpbay.com/api/update/v1/info
Content-Type: application/json
{
"purchase_code": "ABC123-XYZ789-DEF456",
"product_slug": "my-awesome-plugin",
"product_id": "123",
"site_url": "https://example.com",
"product_type": "plugin",
"api_key": "your_api_key_here",
"developer_mode": "0"
}
Success Response
{
"name": "My Product",
"version": "1.2.0",
"description": "A detailed description of My Product.",
"changelog": "List of updates and improvements...",
"download_url": "https://example.com/downloads/my_product_v1.2.0.zip",
"author": "Product Author",
"support_url": "https://example.com/support"
}
Common Errors
no_product_info→ 500invalid_code→ 400
7. Documentation Download Endpoint
https://wpbay.com/api/update/v1/docs_download
HTTP Methods: GET
Purpose
Serves product documentation file if available.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
product_id |
numeric | Product ID | Yes |
Example Request
GET https://wpbay.com/api/update/v1/docs_download?product_id=123
Success Response
File download (no JSON if successful).
Common Errors
invalid_product→ 403no_download→ 404
8. Feedback Submit Endpoint
https://wpbay.com/api/feedback/v1/submit
HTTP Methods: GET POST
Purpose
Submits product feedback. Not stored in sandbox mode.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
purchase_code |
string | Purchase code | Yes |
product_slug |
string | Product slug | Yes |
reason |
string | Feedback reason | Yes |
site_url |
string | Site URL | Yes |
api_key |
string | API key | Yes |
details |
string | Additional details | No |
developer_mode |
string ("0"|"1") | Sandbox | No |
secret_key |
string | For sandbox | Conditional |
Example Request
POST https://wpbay.com/api/feedback/v1/submit
Content-Type: application/json
{
"purchase_code": "ABC123-XYZ789-DEF456",
"product_slug": "my-awesome-plugin",
"reason": "I encountered performance issues.",
"details": "The product slows down the site under heavy load.",
"site_url": "https://example.com",
"api_key": "your_api_key_here",
"developer_mode": "0"
}
Success Response
{
"success": true,
"message": "Feedback successfully submitted."
}
Common Errors
missing_reason→ 400db_error→ 500
9. Analytics Submit Endpoint
https://wpbay.com/api/analytics/v1/submit
HTTP Methods: GET POST
Purpose
Submits analytics events. Not stored in sandbox.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
purchase_code |
string | Purchase code | Yes |
product_slug |
string | Product slug | Yes |
events |
array | Array of event objects | Yes |
site_url |
string | Site URL | Yes |
api_key |
string | API key | Yes |
developer_mode |
string ("0"|"1") | Sandbox | No |
secret_key |
string | For sandbox | Conditional |
Example Request
POST https://wpbay.com/api/analytics/v1/submit
Content-Type: application/json
{
"purchase_code": "ABC123-XYZ789-DEF456",
"product_slug": "my-awesome-plugin",
"events": [
{
"event_name": "activation",
"timestamp": 1677628800,
"wp_version": "5.8",
"php_version": "7.4",
"sdk_version": "1.0.0",
"theme": "Twenty Twenty-One"
}
],
"site_url": "https://example.com",
"api_key": "your_api_key_here",
"developer_mode": "0"
}
Success Response
{
"success": true,
"message": "Analytics events successfully submitted."
}
Common Errors
missing_events→ 400db_error→ 500
10. Upgrade List Endpoint
https://wpbay.com/api/upgrade/v1/list
HTTP Methods: POST
Purpose
Lists available upgrade options for a product.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
product_id |
numeric | Product ID | Yes |
Example Request
POST https://wpbay.com/api/upgrade/v1/list
Content-Type: application/json
{
"product_id": 123
}
Success Response
{
"success": true,
"data": [
{
"id": 456,
"name": "Monthly Access",
"payment_price": "20",
"display_price": "20$ / Monthly",
"subscription_price": "20",
"one_time_fee": "0",
"subscription_interval": "1",
"subscription": "Monthly",
"license_count": "1",
"plan_type": "basic"
}
]
}
Common Errors
no_upgrades_found→ 404invalid_product_id→ 404
11. Contact Form Submission Endpoint
https://wpbay.com/api/contact/v1/submit
HTTP Methods: POST
Purpose
Sends contact form messages to product author.
Required Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
api_key |
string | API key | Yes |
product_slug |
string | Product slug | Yes |
first_name |
string | First name | Yes |
last_name |
string | Last name | Yes |
email |
string | Yes | |
request_type |
string | Request type | Yes |
summary |
string | Summary | Yes |
message |
string | Message | Yes |
Example Request
POST https://wpbay.com/api/contact/v1/submit
Content-Type: application/json
{
"api_key": "your_api_key_here",
"product_slug": "my-awesome-plugin",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"request_type": "Support",
"summary": "Issue with product activation",
"message": "I am experiencing difficulties activating the product on my site. Please advise."
}
Success Response
{
"success": true,
"message": "Your message has been sent successfully."
}
Common Errors
missing_fields→ 400email_failed→ 500
