Skip to main content

Endpoint

GET /clients/business/subscriptions

Headers

Authorization
string
required
Bearer YOUR_ACCESS_TOKEN
SECRET_KEY
string
required
Your API secret key.
businessId
string
required
Your business ID.

Query parameters

page
integer
Page number. Defaults to 1.
limit
integer
Records per page. Defaults to 10.
packageName
string
Filter by package name.
interval
string
Filter by billing interval.
amount
string
Filter by subscription amount (in kobo).
keyword
string
Search across subscription fields by keyword.
See Pagination for full usage.

Response

status
boolean
true on success.
message
string
Human-readable outcome.
data
array
Array of subscription objects.
data[].id
string
Unique subscription ID.
data[].packageName
string
Name of the subscription package.
data[].amount
string
Billing amount in kobo.
data[].interval
string
Billing interval.
data[].businessId
string
The business this subscription belongs to.
data[].clientId
string
The client account this subscription belongs to.
pagination
object
Standard pagination envelope. See Pagination.

Code examples

curl -X GET "https://stella-thirdparty-api.herokuapp.com/api/v1/clients/business/subscriptions?page=1&limit=10" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "SECRET_KEY: YOUR_SECRET_KEY" \
  -H "businessId: YOUR_BUSINESS_ID"

Example response

{
  "status": true,
  "message": "Subscriptions retrieved successfully",
  "data": [
    {
      "id": "sub_001",
      "packageName": "Pro Plan",
      "amount": "500000",
      "interval": "monthly",
      "businessId": "biz_xyz789",
      "clientId": "client_001"
    }
  ],
  "pagination": {
    "totalCount": 3,
    "hasNextPage": false,
    "hasPreviousPage": false,
    "nextPage": 0,
    "previousPage": 0,
    "limit": 10,
    "lastPage": 1
  }
}