> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paypal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get all plans



## OpenAPI

````yaml /api-reference/ubb_openapi_inline.json get /plans
openapi: 3.0.1
info:
  title: Usage Based Billing API
  version: 1.0.0
  description: An Orchestrator for Usage Based Billing and Payments
servers:
  - url: https://api-m.sandbox.paypal.com/v1/commerce/billing
security:
  - BearerAuth:
      - read
      - write
tags:
  - name: Alerts
    description: API endpoints for managing subscription alerts
  - name: Events
    description: API endpoints for managing events
  - name: Metrics
    description: API endpoints for metrics and usage data
  - name: Merchant Activation
    description: API endpoint for merchant activation
  - name: Credit Notes
    description: API endpoints for credit notes management
  - name: Customers
    description: API endpoints for customer management
  - name: Invoices
    description: API endpoints for invoice management
  - name: Plans
    description: API endpoints for subscription plans
  - name: Subscriptions
    description: API endpoints for subscriptions
  - name: Wallets
    description: API endpoints for wallet management
  - name: Taxes
    description: API endpoints for tax management
  - name: Billing Entities
    description: API endpoints for billing entities
  - name: Features
    description: API endpoints for managing features and privileges
  - name: Entitlements
    description: API endpoints for managing plan and subscription entitlements
paths:
  /plans:
    get:
      tags:
        - Plans
      summary: Get all plans
      operationId: GetPlans
      parameters:
        - $ref: '#/components/parameters/per_page'
        - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: A list of plans
          content:
            application/json:
              schema:
                type: object
                properties:
                  plans:
                    type: array
                    items:
                      $ref: '#/components/schemas/Plan'
                  metadata:
                    $ref: '#/components/schemas/PaginationMetadata'
              example:
                plans:
                  - name: UBB Plan - Pro
                    code: ubb_plan_1753826420
                    billing_cycle: WEEKLY
                    description: Pro plan for pro UBB customers
                    amount:
                      value: 160
                      currency_code: USD
                    trial_period: 0
                    pay_in_advance: true
                    usage_based_charges:
                      - id: fggdgd5c-31a6-4d74-b607-ac3915796ab9
                        metric_id: 92c9175c-31a6-4d74-b607-ac3915796ab9
                        charge_model: STANDARD
                        properties:
                          amount: '1.00'
                        min_amount:
                          value: 1
                          currency_code: USD
                    minimum_commitment:
                      amount:
                        value: 100
                        currency_code: USD
                      invoice_display_name: Minimum Commitment
                      id: cc82edfd-8198-4942-bed8-fcd7afb5191e
                      plan_code: ubb_plan_1753826420
                      created_at: '2025-07-31T08:41:19Z'
                      updated_at: '2025-07-31T08:41:19Z'
                    created_at: '2025-07-30T00:59:35Z'
                    id: 95de3538-3827-496b-89a0-120745360830
                metadata:
                  total_count: 29
                  total_pages: 29
                  current_page: 1
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    per_page:
      name: per_page
      in: query
      description: Number of records per page
      schema:
        type: integer
    page:
      name: page
      in: query
      description: Page number
      schema:
        type: integer
  schemas:
    Plan:
      type: object
      properties:
        id:
          type: string
          description: >-
            Unique identifier of the plan. This ID is used internally to track
            the plan and cannot be modified.
          example: 1a901a90-1a90-1a90-1a540-1a901a901a90
        name:
          type: string
        code:
          type: string
        billing_cycle:
          $ref: '#/components/schemas/BillingCycle'
        description:
          type: string
        amount:
          allOf:
            - $ref: '#/components/schemas/Amount'
        trial_period:
          type: integer
        pay_in_advance:
          type: boolean
        taxes:
          type: array
          description: List of tax entities configured for the plan.
          items:
            $ref: '#/components/schemas/TaxResponse'
        usage_based_charges:
          type: array
          items:
            $ref: '#/components/schemas/UsageBasedCharge'
        minimum_commitment:
          allOf:
            - $ref: '#/components/schemas/MinimumCommitment'
        created_at:
          allOf:
            - $ref: '#/components/schemas/DateTimeWithZone'
    PaginationMetadata:
      type: object
      properties:
        total_count:
          type: integer
        total_pages:
          type: integer
        current_page:
          type: integer
    BillingCycle:
      type: string
      description: The billing cycle indicating how often the subscription is charged
      enum:
        - WEEKLY
        - MONTHLY
        - QUARTERLY
        - YEARLY
      x-enum-varnames:
        - WEEKLY
        - MONTHLY
        - QUARTERLY
        - YEARLY
      x-enum-descriptions:
        - Recurring billing occurs every week
        - Recurring billing occurs every month
        - Recurring billing occurs every three months
        - Recurring billing occurs once a year
      example: MONTHLY
    Amount:
      allOf:
        - $ref: '#/components/schemas/AmountNoCurrency'
        - type: object
          required:
            - currency_code
          properties:
            currency_code:
              $ref: '#/components/schemas/Currency'
    TaxResponse:
      description: >-
        Represents a customizable tax rate that can be applied to invoices and
        fees
      type: object
      allOf:
        - $ref: '#/components/schemas/TaxBase'
        - type: object
          properties:
            code:
              $ref: '#/components/schemas/TaxCode'
            id:
              type: string
              format: uuid
              description: Unique identifier of the tax
              example: 1a901a90-1a90-1a90-1a90-1a901a901a90
            created_at:
              allOf:
                - $ref: '#/components/schemas/DateTimeWithZone'
                - description: >-
                    The effective start date of the subscription; can be past,
                    current, or future. Date must be provided in ISO 8601 format
                  example: '2025-06-01T00:00:00Z'
    UsageBasedCharge:
      type: object
      required:
        - id
        - metric_id
      properties:
        id:
          type: string
          description: Unique identifier of the charge
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        metric_id:
          type: string
          description: Unique identifier of the metric
        charge_model:
          $ref: '#/components/schemas/ChargeModel'
          description: Defines the pricing model to calculate the charge
        properties:
          type: object
          description: Pricing thresholds that determine the charges
        taxes:
          type: array
          description: List of tax entities configured for the usage based charge.
          items:
            $ref: '#/components/schemas/TaxResponse'
        min_amount:
          allOf:
            - $ref: '#/components/schemas/Amount'
    MinimumCommitment:
      allOf:
        - $ref: '#/components/schemas/MinimumCommitmentBase'
        - type: object
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier of the minimum commitment, created by Lago.
              example: 1a901a90-1a90-1a90-1a90-1a901a901a90
            plan_code:
              type: string
              example: premium
              description: >-
                The unique code representing the plan to be attached to the
                customer.
            created_at:
              type: string
              format: date-time
              description: >-
                The date and time when the minimum commitment was created. It is
                expressed in UTC format according to the ISO 8601 datetime
                standard. This field provides the timestamp for the exact moment
                when the minimum commitment was initially created.
              example: '2022-04-29T08:59:51Z'
            updated_at:
              type: string
              format: date-time
              description: >-
                The date and time when the minimum commitment was updated. It is
                expressed in UTC format according to the ISO 8601 datetime
                standard. This field provides the timestamp for the exact moment
                when the minimum commitment was initially created.
              example: '2022-04-29T08:59:51Z'
    DateTimeWithZone:
      type: string
      format: date-time
      description: Date and time in ISO 8601 format.
      example: '2023-10-01T12:00:00Z'
    Error:
      type: object
      properties:
        name:
          type: string
        debug_id:
          type: string
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
    AmountNoCurrency:
      type: object
      required:
        - value
      properties:
        value:
          type: number
          format: decimal
          description: >-
            The amount value in the corresponding currency unit (e.g., two
            decimals for USD, no decimals for JPY).
          example: 120.35
          minimum: 0
          nullable: false
          default: 0
    Currency:
      type: string
      description: Currency code in ISO 4217 format.
      example: USD
      minLength: 3
      maxLength: 3
      pattern: ^[A-Z]{3}$
    TaxBase:
      description: Base schema for tax request/response objects
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the tax
          example: TVA
        rate:
          type: string
          pattern: >-
            ^(?!0+(?:\.0+)?$)(?:0?\.\d{1,2}|[1-9]\d?(?:\.\d{1,2})?|100(?:\.0{1,2})?)$
          description: >-
            The percentage rate of the tax applied to transactions. A decimal
            amount from 0.01 to 100.00 inclusive, always with exactly two
            decimal places, no leading zeros except 0.xx.
          example: '20.00'
        description:
          type: string
          description: Detailed description of the tax for internal reference
          example: French standard VAT
    TaxCode:
      type: string
      description: >-
        Unique code used to identify the tax. Must contain only alphanumeric
        characters, underscores, and hyphens.
      pattern: ^[a-zA-Z0-9_-]*$
      example: standard_vat
    ChargeModel:
      type: string
      description: The pricing model applied to this charge
      enum:
        - STANDARD
        - GRADUATED
        - PACKAGE
        - PERCENTAGE
        - VOLUME
      x-enum-varnames:
        - STANDARD
        - GRADUATED
        - PACKAGE
        - PERCENTAGE
        - VOLUME
      x-enum-descriptions:
        - Standard pricing model where a fixed amount is charged per unit
        - >-
          Graduated pricing model where the price per unit decreases as the
          quantity increases
        - >-
          Package pricing model where a fixed price is charged for a set of
          units
        - >-
          Percentage pricing model where a percentage of a base amount is
          charged
        - >-
          Volume-based pricing model where the price varies based on the total
          volume consumed
      example: GRADUATED
      default: STANDARD
    MinimumCommitmentBase:
      type: object
      description: Minimum commitment for this plan.
      required:
        - amount
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/Amount'
        invoice_display_name:
          type: string
          description: >-
            Specifies the name that will be displayed on an invoice. If no value
            is set for this field, the default name will be used as the display
            name.
          example: Minimum Commitment (C1)
        taxes:
          type: array
          description: List of tax entities configured for the minimum commitment.
          items:
            $ref: '#/components/schemas/TaxResponse'
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
        value:
          type: string
        location:
          type: string
        issue:
          type: string
        description:
          type: string
  responses:
    Forbidden:
      description: Authorization failed due to insufficient permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            name: NOT_AUTHORIZED
            message: Authorization failed due to insufficient permissions.
            debug_id: 565f78f101498
            details:
              - issue: PERMISSION_DENIED
                description: >-
                  You do not have permission to access or perform operations on
                  this resource.
    NotFound:
      description: Resource Not Found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal Server Error - An unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            name: INTERNAL_SERVER_ERROR
            message: An internal server error has occurred.
            debug_id: 90957fca61718
  securitySchemes:
    BearerAuth:
      type: oauth2
      description: >-
        Use the /v1/oauth2/token endpoint to obtain an access token and pass it
        as a Bearer token in the Authorization header.
      flows:
        clientCredentials:
          tokenUrl: https://api-m.sandbox.paypal.com/v1/oauth2/token
          scopes:
            read: Read access
            write: Write access

````