Skip to main content

GET /api/subscription/plans

Retrieves all available subscription plans with their pricing, limits, and features. Requires authentication to return plans.

Authentication

This endpoint requires authentication. Include your access token in the request cookies.

Query Parameters

billing
string
default:"monthly"
Billing period for pricing. Options: monthly, annual

Response

plans
AvailablePlan[]
required
Array of available plan objects
billing
string
required
Billing period used for the response. Options: monthly, annual

Example Request

curl -X GET "https://api.contafy.com/api/subscription/plans?billing=annual" \
  -H "Cookie: access_token=your_access_token"

Example Response

{
  "plans": [
    {
      "id": "FREE",
      "name": "FREE",
      "price": 0,
      "originalPrice": null,
      "billing": "annual",
      "limits": {
        "profiles": 1,
        "invoicesPerMonth": 50,
        "expensesPerMonth": 50,
        "exportPDF": false,
        "exportExcel": false,
        "reports": "basic",
        "support": "none",
        "apiAccess": false,
        "satBasicSearchesPerMonth": 10,
        "satAISearchesPerMonth": 0,
        "satMaxResults": 10
      },
      "trialDays": null
    },
    {
      "id": "BASIC",
      "name": "BASIC",
      "price": 2990,
      "originalPrice": 3588,
      "billing": "annual",
      "limits": {
        "profiles": 3,
        "invoicesPerMonth": 200,
        "expensesPerMonth": 200,
        "exportPDF": true,
        "exportExcel": true,
        "reports": "complete",
        "support": "email",
        "apiAccess": true,
        "satBasicSearchesPerMonth": 100,
        "satAISearchesPerMonth": 50,
        "satMaxResults": 50
      },
      "trialDays": 14
    },
    {
      "id": "PRO",
      "name": "PRO",
      "price": 5990,
      "originalPrice": 7188,
      "billing": "annual",
      "limits": {
        "profiles": null,
        "invoicesPerMonth": null,
        "expensesPerMonth": null,
        "exportPDF": true,
        "exportExcel": true,
        "reports": "advanced",
        "support": "priority",
        "apiAccess": true,
        "satBasicSearchesPerMonth": null,
        "satAISearchesPerMonth": 500,
        "satMaxResults": null,
        "satHasAIExplanations": true,
        "satHasHistory": true,
        "satHasFavorites": true,
        "satHasAlerts": true
      },
      "trialDays": 14
    }
  ],
  "billing": "annual"
}

Error Responses

401 Unauthorized
error
Authentication required or token expired
{
  "error": "Unauthorized",
  "message": "Authentication required"
}
400 Bad Request
error
Invalid billing parameter
{
  "error": "Bad Request",
  "message": "Invalid billing period. Must be 'monthly' or 'annual'"
}
500 Internal Server Error
error
Server error occurred
{
  "error": "Internal Server Error",
  "message": "An unexpected error occurred"
}
Annual billing typically includes a discount compared to monthly billing. The originalPrice field shows the equivalent monthly cost over a year.