Whop Plans API

Pricing plans attached to products.

OpenAPI Specification

whop-plans-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Whop REST API (v1) Checkout Configurations Plans API
  description: 'The Whop REST API (v1) is the current primary REST surface for the Whop digital-products / memberships / creator-commerce platform. It lets applications manage memberships and access, products (access passes) and their pricing plans, take payments and issue refunds, manage users and companies, build checkout flows, pay out users via transfers, and register webhooks. All requests are authenticated with a Bearer token (`Authorization: Bearer <API_KEY>`); a Company/Account API key and an App API key are the two key types, with OAuth tokens used when acting on behalf of a signed-in Whop user.

    Grounding notes: base URLs, the Bearer scheme, the `List memberships` and `List payments` query parameters and response fields, and the resource / operation catalog are taken from Whop''s published documentation at docs.whop.com (see the docs `llms.txt` index). Individual action sub-paths (for example the cancel / pause / resume membership actions) are modeled from the documented operation names; verify exact path segments against the live reference on reconciliation.'
  version: '1.0'
  contact:
    name: API Evangelist
    email: kin@apievangelist.com
    url: https://apievangelist.com
  license:
    name: API documentation - Whop Terms of Service
    url: https://whop.com/terms-of-service/
servers:
- url: https://api.whop.com/api/v1
  description: Production
- url: https://sandbox-api.whop.com/api/v1
  description: Sandbox
security:
- bearerAuth: []
tags:
- name: Plans
  description: Pricing plans attached to products.
paths:
  /plans:
    get:
      operationId: listPlans
      tags:
      - Plans
      summary: List plans
      parameters:
      - name: company_id
        in: query
        schema:
          type: string
      - name: product_ids
        in: query
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: A page of plans.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Plan'
                  page_info:
                    $ref: '#/components/schemas/PageInfo'
    post:
      operationId: createPlan
      tags:
      - Plans
      summary: Create a plan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Plan'
      responses:
        '201':
          description: The created plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan'
  /plans/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: retrievePlan
      tags:
      - Plans
      summary: Retrieve a plan
      responses:
        '200':
          description: A plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan'
    post:
      operationId: updatePlan
      tags:
      - Plans
      summary: Update a plan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Plan'
      responses:
        '200':
          description: The updated plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan'
    delete:
      operationId: deletePlan
      tags:
      - Plans
      summary: Delete a plan
      responses:
        '204':
          description: The plan was deleted.
  /plans/{id}/calculate_tax:
    post:
      operationId: calculateTax
      tags:
      - Plans
      summary: Calculate tax for a plan
      description: Estimates tax for a plan at a given billing address. Path segment modeled from the documented `calculate-tax` operation.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: Tax calculation result.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
components:
  schemas:
    PageInfo:
      type: object
      description: Cursor pagination metadata.
      properties:
        has_next_page:
          type: boolean
        has_previous_page:
          type: boolean
        start_cursor:
          type: string
          nullable: true
        end_cursor:
          type: string
          nullable: true
    Plan:
      type: object
      description: A pricing plan attached to a product.
      properties:
        id:
          type: string
        product_id:
          type: string
        plan_type:
          type: string
          description: For example one_time or renewal.
        base_currency:
          type: string
        initial_price:
          type: number
        renewal_price:
          type: number
          nullable: true
        billing_period:
          type: integer
          nullable: true
          description: Billing period length in days.
        trial_period_days:
          type: integer
          nullable: true
        visibility:
          type: string
        created_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Whop API key
      description: 'Bearer token authentication. Use a Company/Account API key or an App API key in the `Authorization: Bearer <API_KEY>` header. OAuth access tokens are used when acting on behalf of a signed-in Whop user.'