LovPics Subscriptions API

The subscriptions API from LovPics — 11 operation(s) for subscriptions.

GitHub OpenAPI

Operations 11

POST /api/subscriptions/create Create Subscription #
GET /api/subscriptions/webhook-config Get Webhook Config #
POST /api/subscriptions/webhook Handle Webhook #
GET /api/subscriptions/verify-payment-status/{subscription_id} Verify Payment Status #
GET /api/subscriptions/status/{subscription_id} Get Subscription Status #
POST /api/subscriptions/upgrade/preview Preview Upgrade #
POST /api/subscriptions/upgrade Upgrade Subscription #
POST /api/subscriptions/cancel/{package_id} Cancel Subscription #
GET /api/subscriptions/my-subscriptions Get My Subscriptions #
GET /api/subscriptions/test-auth Test Subscription Auth #
POST /api/subscriptions/webhook-test Test Webhook #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lovpics-com:lovpics-com-subscriptions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lovpics-com-subscriptions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Virtual Studio Subscriptions API
  version: 0.1.0
tags:
- name: Subscriptions
paths:
  /api/subscriptions/create:
    post:
      tags:
      - Subscriptions
      summary: Create Subscription
      description: 'Create a Razorpay subscription for recurring payments.


        Args:

        request: CreateSubscriptionRequest containing package_id (from packages table)

        current_user: Current authenticated user


        Returns:

        CreateSubscriptionResponse with subscription details for payment


        Raises:

        HTTPException: If subscription creation fails'
      operationId: create_subscription_api_subscriptions_create_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubscriptionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/subscriptions/webhook-config:
    get:
      tags:
      - Subscriptions
      summary: Get Webhook Config
      description: Get webhook configuration status for debugging
      operationId: get_webhook_config_api_subscriptions_webhook_config_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/subscriptions/webhook:
    post:
      tags:
      - Subscriptions
      summary: Handle Webhook
      description: 'Handle Razorpay subscription webhook events.


        This endpoint receives webhook notifications from Razorpay for subscription events

        like activation, charging, cancellation, etc.


        Only allows requests from Razorpay''s whitelisted IP addresses.'
      operationId: handle_webhook_api_subscriptions_webhook_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/subscriptions/verify-payment-status/{subscription_id}:
    get:
      tags:
      - Subscriptions
      summary: Verify Payment Status
      description: 'Verify if a subscription is activated after payment.

        If Razorpay shows active but DB shows inactive, trigger activation automatically.

        Frontend calls this after payment to ensure activation happened.'
      operationId: verify_payment_status_api_subscriptions_verify_payment_status__subscription_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: subscription_id
        in: path
        required: true
        schema:
          type: string
          title: Subscription Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/subscriptions/status/{subscription_id}:
    get:
      tags:
      - Subscriptions
      summary: Get Subscription Status
      description: 'Get subscription status from Razorpay.


        Args:

        subscription_id: Razorpay subscription ID

        current_user: Current authenticated user


        Returns:

        SubscriptionStatusResponse with subscription details'
      operationId: get_subscription_status_api_subscriptions_status__subscription_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: subscription_id
        in: path
        required: true
        schema:
          type: string
          title: Subscription Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/subscriptions/upgrade/preview:
    post:
      tags:
      - Subscriptions
      summary: Preview Upgrade
      description: 'Preview upgrade costs - SIMPLIFIED VERSION.

        Shows FULL package price (no proration).


        Args:

        request: UpgradeSubscriptionRequest containing new_package_id

        current_user: Current authenticated user


        Returns:

        UpgradePreviewResponse with cost breakdown


        Raises:

        HTTPException: If validation fails'
      operationId: preview_upgrade_api_subscriptions_upgrade_preview_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpgradeSubscriptionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradePreviewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/subscriptions/upgrade:
    post:
      tags:
      - Subscriptions
      summary: Upgrade Subscription
      description: 'Upgrade to a higher-tier subscription package - SIMPLE VERSION.

        Charges FULL AMOUNT of new package, cancels old subscription after payment confirmation.


        Args:

        request: UpgradeSubscriptionRequest containing new_package_id

        current_user: Current authenticated user


        Returns:

        CreateSubscriptionResponse with new subscription details for payment


        Raises:

        HTTPException: If upgrade validation fails or subscription creation fails'
      operationId: upgrade_subscription_api_subscriptions_upgrade_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpgradeSubscriptionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubscriptionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/subscriptions/cancel/{package_id}:
    post:
      tags:
      - Subscriptions
      summary: Cancel Subscription
      description: 'Cancel an active subscription by package ID.


        Args:

        package_id: Package ID of the subscription to cancel

        current_user: Current authenticated user


        Returns:

        CancelSubscriptionResponse with cancellation details'
      operationId: cancel_subscription_api_subscriptions_cancel__package_id__post
      security:
      - HTTPBearer: []
      parameters:
      - name: package_id
        in: path
        required: true
        schema:
          type: integer
          title: Package Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelSubscriptionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/subscriptions/my-subscriptions:
    get:
      tags:
      - Subscriptions
      summary: Get My Subscriptions
      description: 'Get all active subscriptions for the current user.


        Returns:

        dict: List of active subscriptions with package details'
      operationId: get_my_subscriptions_api_subscriptions_my_subscriptions_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MySubscriptionsResponse'
      security:
      - HTTPBearer: []
  /api/subscriptions/test-auth:
    get:
      tags:
      - Subscriptions
      summary: Test Subscription Auth
      description: Test endpoint to verify subscription authentication is working.
      operationId: test_subscription_auth_api_subscriptions_test_auth_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /api/subscriptions/webhook-test:
    post:
      tags:
      - Subscriptions
      summary: Test Webhook
      description: Test webhook endpoint without signature verification for testing.
      operationId: test_webhook_api_subscriptions_webhook_test_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
components:
  schemas:
    CancelSubscriptionResponse:
      properties:
        subscription_id:
          type: string
          title: Subscription Id
        status:
          type: string
          title: Status
        cancelled_at:
          type: integer
          title: Cancelled At
        ended_at:
          type: integer
          title: Ended At
      type: object
      required:
      - subscription_id
      - status
      - cancelled_at
      - ended_at
      title: CancelSubscriptionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreateSubscriptionRequest:
      properties:
        package_id:
          type: integer
          title: Package Id
          description: Package ID from packages table
        mc_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Mc Id
          description: Optional marketer coupon id from GET /api/marketer/coupon/lookup
      type: object
      required:
      - package_id
      title: CreateSubscriptionRequest
    UpgradeSubscriptionRequest:
      properties:
        new_package_id:
          type: integer
          title: New Package Id
          description: New package ID to upgrade to
      type: object
      required:
      - new_package_id
      title: UpgradeSubscriptionRequest
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    SubscriptionItem:
      properties:
        subscription_id:
          type: integer
          title: Subscription Id
          examples:
          - 15
        package_id:
          type: integer
          title: Package Id
          examples:
          - 4
        package_name:
          type: string
          title: Package Name
          examples:
          - Growth
        package_credits:
          anyOf:
          - type: integer
          - type: 'null'
          title: Package Credits
          examples:
          - 500
        package_amount:
          anyOf:
          - type: integer
          - type: number
          title: Package Amount
          examples:
          - 49
        package_type:
          type: integer
          title: Package Type
          examples:
          - 1
        status:
          type: integer
          title: Status
          examples:
          - 1
        added_on:
          anyOf:
          - type: string
          - type: 'null'
          title: Added On
          examples:
          - '2026-09-01T00:00:00Z'
        expires_on:
          anyOf:
          - type: string
          - type: 'null'
          title: Expires On
          examples:
          - '2026-10-01T00:00:00Z'
      additionalProperties: true
      type: object
      required:
      - subscription_id
      - package_id
      - package_name
      - package_amount
      - package_type
      - status
      title: SubscriptionItem
    MySubscriptionsResponse:
      properties:
        success:
          type: boolean
          title: Success
          examples:
          - true
        subscriptions:
          items:
            $ref: '#/components/schemas/SubscriptionItem'
          type: array
          title: Subscriptions
        active_package_ids:
          items:
            type: integer
          type: array
          title: Active Package Ids
          examples:
          - - 4
      additionalProperties: true
      type: object
      required:
      - success
      - subscriptions
      - active_package_ids
      title: MySubscriptionsResponse
    CreateSubscriptionResponse:
      properties:
        subscriptionId:
          type: string
          title: Subscriptionid
        planId:
          type: string
          title: Planid
        status:
          type: string
          title: Status
        shortUrl:
          type: string
          title: Shorturl
        keyId:
          type: string
          title: Keyid
      type: object
      required:
      - subscriptionId
      - planId
      - status
      - shortUrl
      - keyId
      title: CreateSubscriptionResponse
    SubscriptionStatusResponse:
      properties:
        subscription_id:
          type: string
          title: Subscription Id
        status:
          type: string
          title: Status
        plan_id:
          type: string
          title: Plan Id
        current_start:
          anyOf:
          - type: integer
          - type: 'null'
          title: Current Start
        current_end:
          anyOf:
          - type: integer
          - type: 'null'
          title: Current End
        ended_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Ended At
        quantity:
          type: integer
          title: Quantity
        notes:
          additionalProperties: true
          type: object
          title: Notes
        charge_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Charge At
        customer_notify:
          type: boolean
          title: Customer Notify
        created_at:
          type: integer
          title: Created At
        total_count:
          type: integer
          title: Total Count
        paid_count:
          type: integer
          title: Paid Count
        remaining_count:
          type: integer
          title: Remaining Count
      type: object
      required:
      - subscription_id
      - status
      - plan_id
      - quantity
      - notes
      - customer_notify
      - created_at
      - total_count
      - paid_count
      - remaining_count
      title: SubscriptionStatusResponse
    UpgradePreviewResponse:
      properties:
        old_package_id:
          type: integer
          title: Old Package Id
        old_package_name:
          type: string
          title: Old Package Name
        old_package_price:
          type: number
          title: Old Package Price
        old_package_credits:
          type: integer
          title: Old Package Credits
        new_package_id:
          type: integer
          title: New Package Id
        new_package_name:
          type: string
          title: New Package Name
        new_package_price:
          type: number
          title: New Package Price
        new_package_credits:
          type: integer
          title: New Package Credits
        current_credits:
          type: integer
          title: Current Credits
        remaining_value:
          type: number
          title: Remaining Value
        prorated_amount:
          type: number
          title: Prorated Amount
        subtotal:
          type: number
          title: Subtotal
        tax:
          type: number
          title: Tax
        total_due_today:
          type: number
          title: Total Due Today
        next_billing_amount:
          type: number
          title: Next Billing Amount
        next_billing_date:
          type: string
          title: Next Billing Date
        carry_over_credits:
          type: integer
          title: Carry Over Credits
          default: 0
        total_credits_after_upgrade:
          type: integer
          title: Total Credits After Upgrade
          default: 0
      type: object
      required:
      - old_package_id
      - old_package_name
      - old_package_price
      - old_package_credits
      - new_package_id
      - new_package_name
      - new_package_price
      - new_package_credits
      - current_credits
      - remaining_value
      - prorated_amount
      - subtotal
      - tax
      - total_due_today
      - next_billing_amount
      - next_billing_date
      title: UpgradePreviewResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer