API Reference
SDK Support
For easier integration, consider using our official SDKs: @saazpayhq/node-sdk
Authentication
All API endpoints require authentication using a Bearer token. Include your API key in the Authorization header:
Endpoints
Get Plans
Retrieve all available pricing plans for your application.
Endpoint: GET /plans
Query Parameters:
id(required): Your application ID
Example Request:
Response:
Get Active Subscription
Retrieve the active subscription for a specific user.
Endpoint: GET /subscriptions
Query Parameters:
appId(required): Your application IDuserId(required): The unique identifier for the user
Example Request:
Response:
Note: Returns null if no active subscription is found for the user.
Get Management URLs
Retrieve management URLs for a specific subscription.
Endpoint: GET /subscriptions/management
Query Parameters:
appId(required): Your application IDsubscriptionId(required): The subscription ID
Example Request:
Response:
Preview Plan Change
Preview the changes and costs when switching to a new plan.
Endpoint: GET /subscriptions/management/preview-plan
Query Parameters:
appId(required): Your application IDsubscriptionId(required): The subscription IDnewPlanId(required): The new plan ID to preview
Example Request:
Response:
Change Plan
Change the subscription to a new plan.
Endpoint: PUT /subscriptions/management/change-plan
Query Parameters:
appId(required): Your application IDsubscriptionId(required): The subscription IDnewPlanId(required): The new plan ID to change to
Example Request:
Response: