For the complete documentation index, see llms.txt. This page is also available as Markdown.

Subscriptions (User)

Operations related to subscriptions from a user viewpoint.

Get the authenticated user's subscriptions

get

Retrieves subscriptions belonging to the authenticated user. Use the page parameter to paginate results. Set only_recurring_subscription to true to retrieve only recurring subscriptions.

Authorization:

  • Requires a valid JWT Bearer token.

  • The token must identify an authenticated end user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
pageintegerOptional

The page number to retrieve.

Default: 1
max_pageintegerOptional

The maximum number of elements per page. This number must be between 5 and 50.

Default: 50
only_recurring_subscriptionbooleanOptional

Include only recurring subscriptions.

Default: false
Responses
200

Successful operation

application/json
subscription_countintegerRequiredExample: 3
get/user/subscriptions
GET /v1/user/subscriptions HTTP/1.1
Host: api.tip4serv.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "subscriptions": [
    {
      "id": 1,
      "name": "VIP+ Subscription",
      "status": "text",
      "price": 6.49,
      "onetime": false,
      "username": "Duster",
      "start_date": 1760980455708,
      "next_payment": 1761674734637,
      "expire_date": 1761674734637,
      "unsubscribed": false,
      "duration_periodicity": "month",
      "period_num": 3,
      "currency": "USD",
      "details_page": "https://tip4serv.com/dashboard/subscription-details?id=1"
    }
  ],
  "subscription_count": 3
}

Unsubscribe the authenticated user from a subscription

patch

Unsubscribes the authenticated user from one of their active subscriptions.

Authorization:

  • Requires a valid JWT Bearer token.

  • The token must identify an authenticated end user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
subscription_idintegerRequired

The ID of the subscription to unsubscribe from.

Example: 1452
Responses
200

Successful operation

application/json
statusintegerRequiredExample: 200
messagestringRequiredExample: You have successfully unsubscribed from your subscription.
patch/user/subscriptions/unsubscribe
PATCH /v1/user/subscriptions/unsubscribe HTTP/1.1
Host: api.tip4serv.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "subscription_id": 1452
}
{
  "status": 200,
  "message": "You have successfully unsubscribed from your subscription."
}

Last updated