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

# Create Digital Product

> Mendaftarkan produk digital baru lengkap dengan file delivery, harga, dan akses pasca pembayaran.



## OpenAPI

````yaml POST /products/digital
openapi: 3.1.0
info:
  title: Daekan Public API
  description: >-
    API untuk smart order management, payment link, digital products, dan
    payment webhook.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.daekan.app/v1
security:
  - bearerAuth: []
paths:
  /products/digital:
    post:
      summary: Create digital product
      description: >-
        Mendaftarkan produk digital baru lengkap dengan file delivery, harga,
        dan akses pasca pembayaran.
      requestBody:
        description: Payload produk digital
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDigitalProductRequest'
        required: true
      responses:
        '201':
          description: Produk digital berhasil dibuat
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DigitalProduct'
        '422':
          description: Validasi gagal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateDigitalProductRequest:
      required:
        - name
        - price
        - files
      type: object
      properties:
        name:
          type: string
        price:
          type: number
        currency:
          type: string
          example: IDR
        description:
          type: string
        files:
          type: array
          items:
            $ref: '#/components/schemas/DigitalFile'
        downloadWindowHours:
          type: integer
    DigitalProduct:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        price:
          type: number
        currency:
          type: string
        files:
          type: array
          items:
            $ref: '#/components/schemas/DigitalFile'
        createdAt:
          type: string
          format: date-time
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    DigitalFile:
      type: object
      properties:
        name:
          type: string
        url:
          type: string
          format: uri
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````