License Manager API Endpoints

Validate License Request

GET/REQUEST: /wp-json/getpaid/v1/licenses/{licence_key}/{item_id}

license_key is the key given after purchasing the item.
Item_id is the id of the product purchased.

Example return:

{"id": 6,
"status": "active",
"date_created": "2023-01-19 13:54:33",
"date_created_gmt": "2023-01-19 13:54:33",
"date_expires": "2023-02-19 13:54:33",
"date_expires_gmt": "2023-02-19 13:54:33",
"date_last_activated": "0000-00-00 00:00:00",
"date_last_activated_gmt": "0000-00-00 00:00:00",
"item_id": 5026,
"invoice_id": 5034,
"customer_id": 1,
"license_key": "4bb82ecd347bac6dc5f0ccbf1990",
"activations": 1,
"max_activations": 3,
"activated_on": {"ppldb.com/stiofan": "2023-01-19 14:42:06"
},

"view_url": "https://demos.ayecode.io/getpaid/my-licenses/?license=6",
"item_version": "1.0.0",
"item_changelog": "",
"_links": {"self": [  {"href": "https://demos.ayecode.io/getpaid/wp-json/getpaid/v1/licenses/6"
}

],

"collection": [  {"href": "https://demos.ayecode.io/getpaid/wp-json/getpaid/v1/licenses"
}

],

"customer": [  {"embeddable": true,
"href": "https://demos.ayecode.io/getpaid/wp-json/wp/v2/users/1"
}

],

"invoice": [  {"embeddable": true,
"href": "https://demos.ayecode.io/getpaid/wp-json/getpaid/v1/invoices/5034"
}

],

"item": [  {"embeddable": true,
"href": "https://demos.ayecode.io/getpaid/wp-json/getpaid/v1/items/5026"
}

],

}

}

Activate license

POST: /wp-json/getpaid/v1/licenses/{licence_key}/{item_id}/activate?app={website_url}

license_key is the key given after purchasing the item.
Item_id is the id of the product purchased.
website_url is the website where it is being activated, this can also be changed to a app name if used in an app.

Example return (first time activation): This is the same as the validation return above.
Example return if already active on the given website:

{"code": "already_activated",
"message": "This license key is already activated on the website.",
"data": {"status": 400}
}<br>

Deactivate license

POST: /wp-json/getpaid/v1/licenses/{licence_key}/{item_id}/deactivate?app={website_url}

license_key is the key given after purchasing the item.
Item_id is the id of the product purchased.
website_url is the website where it is being activated, this can also be changed to a app name if used in an app.

Example return: This is the same as the validation return above.

Check if a license is active on a specific site

POST: /wp-json/getpaid/v1/licenses/{licence_key}/{item_id}/check?app={website_url}

license_key is the key given after purchasing the item.
Item_id is the id of the product purchased.
website_url is the website where it is being activated, this can also be changed to a app name if used in an app.

Example return: 

{ "is_active": true }

Still need help? Contact Us Contact Us