Skip to main content
License products support subscription-style plans with different durations and prices. When a customer purchases a plan, the license key is issued with an expiry date based on the selected duration.

Duration Keys

Duration KeyDisplay LabelDays
monthlyشهر30
quarterly٣ اشهر90
semiAnnual٦ أشهر180
annuallyسنه365
biennialسنتين730
quinquennial٥ سنوات1,825
decennial١٠ سنوات3,650
You can set a different price for each duration when creating or editing your product. Customers choose their preferred plan at checkout.

Plan Data in Responses

When a license has a plan, the API response includes full plan details:
{
  "plan": {
    "duration": "annually",
    "duration_label": "سنه",
    "start_date": "23-03-2026",
    "end_date": "23-03-2027",
    "is_active": true
  },
  "expires_at": "2027-03-23T12:00:00.000000Z",
  "expires_in_days": 365
}
FieldDescription
plan.durationThe raw duration key (e.g. annually)
plan.duration_labelArabic display label (e.g. سنه)
plan.start_dateWhen the plan started (DD-MM-YYYY)
plan.end_dateWhen the plan ends (DD-MM-YYYY)
plan.is_activeWhether the plan period is currently active
expires_atISO 8601 expiry timestamp
expires_in_daysDays remaining until expiry

Lifetime Licenses

For products sold as one-time purchases without an expiry, the response shows:
{
  "plan": null,
  "expires_at": null,
  "expires_in_days": null
}
Check for expires_at == null in your code to determine if a license is lifetime. A lifetime license never expires and will always return "status": "active" (unless manually revoked or suspended).

Expiry Behavior

  • An hourly background job checks all licenses and marks expired ones automatically.
  • Once expired, the API returns LICENSE_EXPIRED (HTTP 403) for that key.
  • The expires_in_days field lets you show a countdown or warning to your users before their license expires.
Licenses are tied to the order. If an order is cancelled or refunded, all associated license keys are revoked regardless of their remaining duration.