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

# Create Pricing

> Create Pricing



## OpenAPI

````yaml openapi/v1-en.yaml POST /api/v1/prices
openapi: 3.0.3
info:
  title: Subotiz API
  description: Subotiz OpenAPI
  version: 1.0.0
servers:
  - url: https://{api}.subotiz.com
    variables:
      api:
        default: api
security:
  - sec0: []
tags:
  - name: Subscription
    description: Subscription
  - name: Price
    description: Price
  - name: Trade
    description: Trade
  - name: Payment
    description: Payment
  - name: Checkout Session
    description: Checkout Session
  - name: Customer
    description: Customer
  - name: Customer Portal
    description: Customer Portal
paths:
  /api/v1/prices:
    post:
      tags:
        - Price
      summary: Create Pricing
      description: Create Pricing
      operationId: v1-price-create-price
      parameters:
        - $ref: '#/components/parameters/HeaderRequestID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePriceRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePriceResponse'
components:
  parameters:
    HeaderRequestID:
      name: Request-Id
      in: header
      description: The unique identifier of the request
      required: true
      schema:
        type: string
        default: 008e3967-a1b5-48bb-be14-d5bff5092e61
  schemas:
    CreatePriceRequest:
      required:
        - name
        - product_id
        - product_version_id
        - billing_type
        - description
        - price_type
      type: object
      properties:
        name:
          type: string
          description: Price name
        product_id:
          type: string
          description: Associated product ID
        product_version_id:
          type: string
          description: Product version ID
        billing_type:
          type: string
          description: 'Billing type: one_time/recurring'
        price_val:
          type: string
          description: One-time payment price, required when `billing_type` is one_time
        description:
          type: string
          description: Price description
        has_trial:
          type: boolean
          description: Whether trial period is enabled
        trial_period:
          allOf:
            - $ref: '#/components/schemas/TrialPeriod'
          description: Trial period configuration
        price_plan:
          allOf:
            - $ref: '#/components/schemas/CreatePricePlan'
          description: Price plan, required when `billing_type` is recurring
        price_type:
          type: string
          description: >-
            Price type, one of the following: flat_price | package_price |
            based_on_usage
        usage_amount:
          type: string
          description: >-
            Usage amount, required when `price_type` is based_on_usage or
            package_price
        usage_unit:
          type: string
          description: >-
            Usage unit, required when `price_type` is based_on_usage or
            package_price
        features:
          type: array
          items:
            $ref: '#/components/schemas/CreatePriceFeature'
          description: Price features
        model_type:
          type: string
          description: >-
            Model type, one of the following: per_unit | tiers_price, required
            when `price_type` is based_on_usage
        billing_threshold:
          type: string
          description: Billing threshold, required when `model_type` is per_unit
        trial_type:
          type: integer
          description: 'Trial type, one of the following: 0 - Free trial | 1 - Paid trial'
          format: int32
        trial_amount:
          type: string
          description: Trial amount, required when `trial_type` is 1 - Paid trial
        status:
          type: string
          description: |-
            Status:
             - draft: Draft
             - active: Activated
             - frozen: Frozen
      description: Create price request
    CreatePriceResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
        data:
          $ref: '#/components/schemas/CreatePriceResponse_Data'
      description: Create price response
    TrialPeriod:
      type: object
      properties:
        trial_period_unit:
          type: string
          description: 'Trial period unit, required, such as: day, week, month, etc.'
        trial_period_count:
          type: integer
          description: 'Trial period count, required, such as: 7 days, 1 month, etc.'
          format: int32
      description: TrialPeriod - Trial period configuration
    CreatePricePlan:
      type: object
      properties:
        base_price_val:
          type: string
          description: Base price, base pricing of the plan
        billing_cycle_unit:
          type: string
          description: >-
            Billing cycle unit, one of the following: week, month, quarter,
            year, customer-initiated, over_threshold.
        price_tiers:
          type: array
          items:
            $ref: '#/components/schemas/CreatePriceTier'
          description: Tiered pricing details, specific prices for different cycles
        price_usage_tiers:
          type: array
          items:
            $ref: '#/components/schemas/PriceUsageTier'
          description: Tiered pricing details, specific prices for different usage amounts
        price_tier_type:
          type: string
          description: >-
            price tier type, one of the following: common | volume | grading,
            common for flat price and package price, volume and grading for
            based_on_usage price
        usage_unit_price:
          type: string
          description: usage unit price
      description: Pricing plan for create price
    CreatePriceFeature:
      type: object
      properties:
        product_feature_id:
          type: string
          description: Product feature ID
        value:
          type: string
          description: Feature value, default value is 0
      description: Create price feature
    CreatePriceResponse_Data:
      type: object
      properties:
        price_id:
          type: string
          description: Price ID
        price_version_id:
          type: string
          description: Price version ID
      description: Create price response
    CreatePriceTier:
      type: object
      properties:
        billing_cycle_index:
          type: integer
          description: Billing cycle index, indicating which cycle
          format: int32
        price_val:
          type: string
          description: Price value, specific price for this cycle
      description: Create price tier
    PriceUsageTier:
      type: object
      properties:
        usage_min:
          type: string
          description: Usage minimum
        usage_max:
          type: string
          description: Usage maximum
        current_tier_amount:
          type: string
          description: Current tier amount
      description: Tiered pricing details for usage
  securitySchemes:
    sec0:
      type: http
      description: >-
        Bearer API Key authentication. Format: Authorization: Bearer
        {your_api_key}
      scheme: bearer

````