Updated June 28th 2026
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.
WPBay API Update June 2026: Product Plans and plan_type
WPBay products can have one default plan or multiple custom plans, such as Basic, Pro, Agency, or any other plan created by the seller.
plan_type is returned by WPBay. Do not send it manually in API requests. WPBay detects the purchased plan from the purchase code and the product variation selected at checkout.
How it works
plan_typeidentifies the product plan purchased by the customer.- Products without custom plans use the default internal plan type:
wpbay. - Custom plans return their internal plan slug, for example
basic,pro, oragency. - Developer sandbox licenses currently return the default plan type:
wpbay. - Your plugin or theme can use
plan_typeto unlock plan-specific features. max_license_countcontrols how many sites can be activated. It is separate fromplan_type.
Example
{
"success": true,
"plan_type": "pro",
"message": "License successfully registered."
}
Keep wpbay as the backward-compatible default plan key in API integrations, even if the public seller-facing label is renamed in the WPBay interface.
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.
Request 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": "admin@example.com",
"api_key": "your_api_key_here",
"product_slug": "my-awesome-plugin",
"developer_mode": "0"
}
Success Response
{
"success": true,
"plan_type": "pro",
"message": "License successfully registered."
}
plan_type is the plan purchased by the customer. If the product does not use custom plans, the value will be wpbay.
If the same license is already registered for the same site, WPBay may return:
{
"success": true,
"plan_type": "pro",
"message": "License already registered."
}
Common Errors
missing_api_key→ 403invalid_api_key→ 403missing_purchase_code→ 403missing_site_url→ 403missing_product_slug→ 403missing_admin_email→ 403invalid_code→ 400 Invalid purchase codeinvalid_product_id→ 403 Product ID does not match the purchase codeinvalid_product_slug→ 403 Product slug does not match the purchased productorder_not_available→ 400 Order refunded, cancelled, failed, or unavailablelimit_reached→ 403 License limit exceededduplicate_entry→ 409 License already registered for this sitedb_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.
Request 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.
Request 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",
"plan_type": "pro",
"message": "This purchase code is registered."
}
plan_type is read from the active license registration. If older registration data does not contain a stored plan, WPBay falls back to the plan detected from the purchase code, or to wpbay.
Common Errors
missing_api_key→ 403invalid_api_key→ 403missing_purchase_code→ 403missing_site_url→ 403invalid_purchase_code→ 400not_found→ 400 Not registeredorder_not_available→ 400subscription_inactive→ 400 Subscription is no longer activenot_allowed→ 400 Ownership mismatch
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.
Request 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"
}
Success Response
{
"order_id": 1234,
"order_item_id": 5678,
"product_id": 910,
"product_title": "Your Product",
"license_number": "LIC-00123",
"max_license_count": "1",
"plan_type": "pro",
"order_status": "completed",
"order_date": "2025-02-26 14:30:00",
"billing_email": "customer@example.com",
"customer_id": 1112
}
plan_type tells your integration which product plan was purchased.
max_license_count tells your integration how many site activations are allowed for the license. A value of 0 or d should be treated as unlimited by WPBay.
Common Errors
missing_api_key→ 403invalid_api_key→ 403missing_purchase_code→ 403invalid_purchase_code→ 400order_not_available→ 400subscription_inactive→ 400 Subscription is no longer activenot_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.
plan_type to this endpoint. WPBay validates the license using the purchase code, site URL, product ID and product slug. The purchased plan is detected internally from the purchase code. If your product has plan-specific features, use the registration, registration check, or verification endpoint and read the returned plan_type.
Request 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.
plan_type to this endpoint. WPBay validates the license using the purchase code, site URL, product ID and product slug. The purchased plan is detected internally from the purchase code. If your product has plan-specific features, use the registration, registration check, or verification endpoint and read the returned plan_type.
Request 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.
Request 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.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
purchase_code |
string | Purchase code | Yes |
product_slug |
string | Product slug | Yes |
product_id |
string | WPBay product ID | 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",
"product_id": "123",
"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.
Request 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 and purchasable plans for a product.
Each item in data represents one available product variation / plan option. Use this endpoint if you want to display upgrade options inside your plugin or theme.
Request 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"
},
{
"id": 457,
"name": "Yearly Access",
"payment_price": "99",
"display_price": "99$ / Yearly",
"subscription_price": "99",
"one_time_fee": "0",
"subscription_interval": "1",
"subscription": "Yearly",
"license_count": "3",
"plan_type": "pro"
}
]
}
Response Fields
| Field | Description |
|---|---|
id |
WPBay variation ID for this plan option |
name |
Human-readable option name |
payment_price |
The price currently displayed for this option |
display_price |
Formatted price label |
subscription_price |
Recurring subscription price, if applicable |
one_time_fee |
One-time fee / lifetime price, if applicable |
subscription_interval |
Billing interval number |
subscription |
Billing label, for example Monthly, Yearly, or One-time |
license_count |
Number of activations included in this option |
plan_type |
Internal plan slug, for example wpbay, basic, pro, or agency |
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.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
api_key |
string | API key | Yes |
product_slug |
string | Product slug | Yes |
product_id |
string | WPBay product ID | 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",
"product_id": "123",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"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
