diff --git a/README.md b/README.md index 6d3612b..a921097 100644 --- a/README.md +++ b/README.md @@ -156,11 +156,19 @@ GET /products/{product_id}/check_license?license=LICENSE_KEY "status": "active", "expires": "2024-12-31", "customer_name": "John Doe", - "customer_email": "john@example.com" + "customer_email": "john@example.com", + "renewal_url": "https://example.com/renew?license={license_code}&email={email}" } } ``` +The `renewal_url` field is optional in the license verification response. When present and the license status is `expired`, a renewal link is displayed on the admin license page. The URL supports two placeholders that are replaced automatically: + +- `{license_code}` — replaced with the stored license key +- `{email}` — replaced with the `buyer_email` from the license data + +A static URL without placeholders (e.g., `https://example.com/renew`) is also supported. + ### Ping Endpoint ``` diff --git a/tests/IntegrationLicenseTest.php b/tests/IntegrationLicenseTest.php index 79af241..67532eb 100644 --- a/tests/IntegrationLicenseTest.php +++ b/tests/IntegrationLicenseTest.php @@ -231,4 +231,5 @@ public function get_license_renewal_url_returns_url_without_placeholders() { $integration->get_license_renewal_url() ); } + }