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

# Create Product

> Create a product with one or more price configurations. Product names can include localized values for multiple languages.



## OpenAPI

````yaml POST /product
openapi: 3.1.0
info:
  title: Clink API
  description: >-
    Official API documentation for Clink's payment processing platform. This API
    enables merchants to create and manage payment sessions, handle
    subscriptions, and process transactions.
  version: 1.0.0
servers:
  - url: https://uat-api.clinkbill.com/api/
security:
  - ApiKeyAuth: []
paths:
  /product:
    post:
      summary: Create Product
      description: >-
        Create a product with one or more price configurations. Product names
        can include localized values for multiple languages.
      operationId: createProduct
      parameters:
        - $ref: '#/components/parameters/TimestampHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductApiInsertBo'
            examples:
              recurringProduct:
                summary: Recurring product with localized names
                value:
                  name: Pro Plan
                  localizedNames:
                    en-US: Pro Plan
                    zh-CN: 专业版套餐
                  description: Access to Pro features
                  image: oss_xxxxx
                  taxCategory: software_service
                  priceList:
                    - currency: USD
                      unitAmount: 29.99
                      priceType: recurring
                      isDefaultPrice: true
                      recurringDetails:
                        interval: quarter
                        intervalCount: 1
                        trialPeriodDays: 7
                        pricingModel: flat_rate
      responses:
        '200':
          description: Product created successfully
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RProductApiVo'
            application/json:
              schema:
                $ref: '#/components/schemas/RProductApiVo'
        '401':
          description: Unauthorized
          content:
            '*/*':
              schema:
                type: string
components:
  parameters:
    TimestampHeader:
      name: X-Timestamp
      in: header
      required: true
      description: >-
        Current timestamp in milliseconds since Unix epoch (required for request
        signing)
      schema:
        type: string
        example: '1783513683000'
  schemas:
    ProductApiInsertBo:
      required:
        - name
        - image
        - taxCategory
      type: object
      description: Parameters required to create a product by API
      properties:
        name:
          type: string
          description: Default product name
        localizedNames:
          type: object
          description: >-
            Localized product names. Key is a language or locale code, value is
            the localized product name.
          additionalProperties:
            type: string
        description:
          type: string
          description: Product description
        defaultPrice:
          type: string
          description: >-
            Default price ID. Usually omitted when creating a new product with
            priceList.
        image:
          type: string
          description: Uploaded product image OSS ID
        taxCategory:
          type: string
          description: Product tax category
          enum:
            - digital_goods_or_service
            - ebook
            - software_service
        priceList:
          type: array
          description: Prices to create with this product
          items:
            $ref: '#/components/schemas/PriceApiInsertBo'
    RProductApiVo:
      type: object
      properties:
        code:
          type: integer
          description: Response status code, 200 when success
          format: int32
        msg:
          type: string
          description: Brief description of what happened, success when happy case
        data:
          $ref: '#/components/schemas/PlatformProductApiVo'
      description: Body of the response message
    PriceApiInsertBo:
      type: object
      description: Price item used when creating a product
      properties:
        currency:
          type: string
          description: Three-letter ISO currency code, such as USD or EUR
        unitAmount:
          type: number
          description: Unit amount for one-time or recurring base price
        priceType:
          type: string
          description: Price type
          enum:
            - one_time
            - recurring
        recurringDetails:
          $ref: '#/components/schemas/RecurringDetails'
        priority:
          type: integer
          format: int32
          description: Regional pricing priority. Lower values have higher priority.
        isActive:
          type: string
          description: Whether this price is active
        isDefaultPrice:
          type: boolean
          description: Whether this price should be the product default price
    PlatformProductApiVo:
      type: object
      properties:
        productId:
          type: string
          description: Unique identifier of the product
          refType: null
        name:
          type: string
          description: The name of the product
          refType: null
        active:
          type: boolean
          description: Is it available for purchase
          refType: null
        description:
          type: string
          description: The description of the product
          refType: null
        defaultPrice:
          type: string
          description: The default price ID of the product
          refType: null
        image:
          type: string
          description: The image URL of the product
          refType: null
        taxCategory:
          type: string
          description: The type of tax
          enum:
            - digital_goods_or_service
            - ebook
            - software_service
          refType: null
        priceList:
          type: array
          description: Product price list
          items:
            $ref: '#/components/schemas/PlatformPriceApiVo'
          refType: PlatformPriceApiVo
        createTime:
          type: integer
          description: Unix timestamp when the product was created
          format: int64
          refType: null
        updateTime:
          type: integer
          description: Unix timestamp when the product was updated
          format: int64
          refType: null
        localizedNames:
          type: object
          description: >-
            Localized product names. Key is a language or locale code, value is
            the localized product name.
          additionalProperties:
            type: string
          refType: null
    RecurringDetails:
      type: object
      properties:
        interval:
          type: string
          description: >-
            Units used per subscription period. Supported values: day, week,
            month, year, quarter, half_year, custom.
          enum:
            - day
            - week
            - month
            - year
            - quarter
            - half_year
            - custom
          refType: null
        trialPeriodDays:
          type: integer
          description: Number of days customers can use for free
          format: int32
          refType: null
        pricingModel:
          type: string
          description: The pricing model used for this subscription
          enum:
            - flat_rate
            - per_seat
            - tiered
            - usage_based
          refType: null
        transformQuantity:
          $ref: '#/components/schemas/TransformQuantity'
          refType: TransformQuantity
        intervalCount:
          type: integer
          description: >-
            Number of interval units per billing cycle. For custom intervals,
            this value represents the number of days.
          format: int32
          refType: null
      description: Details of the Subscription
    PlatformPriceApiVo:
      type: object
      properties:
        priceId:
          type: string
          description: Unique identifier of the price
          refType: null
        priceSnapshotId:
          type: string
          description: >-
            Current active price snapshot ID. Returns null when no active
            snapshot exists.
          refType: null
        productId:
          type: string
          description: Unique identifier of the product
          refType: null
        currency:
          type: string
          description: ISO currency code for subscription pricing
          enum:
            - USD
            - EUR
            - JPY
            - GBP
            - AUD
            - CAD
            - CNY
            - HKD
            - SGD
            - KRW
            - AED
            - THB
            - IDR
            - PHP
            - MYR
            - BRL
            - INR
          refType: null
        unitAmount:
          type: number
          description: Per-unit price amount
          refType: null
        priceType:
          type: string
          description: the type of the price
          enum:
            - one_time
            - recurring
          refType: null
        recurring:
          $ref: '#/components/schemas/RecurringDetails'
          refType: RecurringDetails
        active:
          type: boolean
          description: Is it available for purchase
          refType: null
        createTime:
          type: integer
          description: Unix timestamp when the price was created
          format: int64
          refType: null
    TransformQuantity:
      type: object
      properties:
        divideBy:
          type: integer
          description: Unit conversion ratio, such as converted at 1024
          format: int32
          refType: null
        round:
          type: string
          description: After division, round the result up or down
          enum:
            - up
            - down
            - ceiling
            - floor
            - half_up
            - half_down
            - half_even
            - unnecessary
          refType: null
      description: Define the rules for converting this unit
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your secret API key obtained from the Clink dashboard (Developers
        section)

````