POST ?action=verify_trial

Validates a trial code and returns the associated activation context. Use this to power a trial upgrade flow — verify the code first, then pass the activation_id and selected product to create_renewal.

Request Parameters

trial_code — string — Required. The trial code issued to the customer.

Response Fields

trial_request_id — integer — Trial request ID

activation_id — integer — Activation ID linked to this trial

customer_email — string — Customer email address

customer_name — string — Customer full name

expiration_date — string or null — Trial expiration datetime (UTC)

connections — integer — Number of connections on the current trial line

eligible_products — array — Active non-trial products available for upgrade (see Product Object below)

Product Object

id — integer — Product ID

name — string — Product name

alternate_name — string or null — Alternate display name

price_decimal — float — Product price

currency — string — Currency code e.g. USD

duration_months — integer — Subscription duration in months

connections — integer — Number of simultaneous connections

Example

curl -X POST "https://YOUR_DOMAIN/api/api.php?action=verify_trial" \
  -H "X-Panelr-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"trial_code": "TRL-ABC123"}'