> ## 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 Payment Link

> Membuat payment link baru untuk jasa, custom order, invoice, atau penagihan langsung.



## OpenAPI

````yaml POST /payment-links
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:
  /payment-links:
    post:
      summary: Create payment link
      description: >-
        Membuat payment link baru untuk jasa, custom order, invoice, atau
        penagihan langsung.
      requestBody:
        description: Payload payment link
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentLinkRequest'
        required: true
      responses:
        '201':
          description: Payment link berhasil dibuat
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLink'
        '422':
          description: Validasi bisnis gagal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreatePaymentLinkRequest:
      required:
        - title
        - amount
        - currency
      type: object
      properties:
        title:
          type: string
        amount:
          type: number
        currency:
          type: string
          example: IDR
        successUrl:
          type: string
          format: uri
        expiresAt:
          type: string
          format: date-time
        customer:
          $ref: '#/components/schemas/Customer'
        metadata:
          type: object
          additionalProperties:
            type: string
    PaymentLink:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        checkoutUrl:
          type: string
          format: uri
        status:
          type: string
          enum:
            - active
            - expired
            - archived
        createdAt:
          type: string
          format: date-time
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    Customer:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````