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

# Create a new payment link

> Creates a new payment link that can be shared with customers to collect payments.



## OpenAPI

````yaml /openapi.yaml post /payment-links
openapi: 3.0.0
info:
  title: HelloPay API
  description: HelloPay Backend API Documentation
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /payment-links:
    post:
      tags:
        - PaymentLinks
      summary: Create a new payment link
      description: >-
        Creates a new payment link that can be shared with customers to collect
        payments.
      operationId: PaymentLinksController_createPaymentLink
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentLinkDto'
      responses:
        '201':
          description: Payment link successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLinkResponse'
        '400':
          description: Invalid input data
        '401':
          description: Unauthorized
components:
  schemas:
    CreatePaymentLinkDto:
      type: object
      properties:
        amountType:
          type: string
          description: Amount type for the payment link. Only FIXED is currently supported
          example: FIXED
        reference:
          type: string
          description: Unique reference for the payment link
          example: INV-2024-001
        amountInCents:
          type: number
          description: Fixed amount in cents for the payment link
          example: 100000
          minimum: 1
        callbackUrl:
          type: string
          description: >-
            Callback URL that will be attached to payins created from this
            payment link
          example: https://example.com/callback
        rail:
          type: string
          description: Payment rail. Restricts which rail the customer must use.
          example: PSE
          enum:
            - BRE_B
            - PSE
        inlineCustomer:
          description: >-
            Pre-established customer data attached to payins created from this
            link
          allOf:
            - $ref: '#/components/schemas/CustomerDataDto'
        pse:
          description: PSE payment details attached to this payment link when rail is PSE
          allOf:
            - $ref: '#/components/schemas/PaymentLinkPseDto'
      required:
        - amountType
        - reference
        - amountInCents
        - callbackUrl
    PaymentLinkResponse:
      type: object
      properties:
        paymentLinkId:
          type: string
          description: Unique payment link ID
          example: ad78347a-9fd5-40b3-9e18-d89a0fe9989d
        paymentLinkUrl:
          type: string
          description: >-
            URL to share with the customer to complete the payment using the
            payment link
          example: >-
            https://pay.hellopay.com.co/link/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
        createdAt:
          format: date-time
          type: string
          description: Creation timestamp
          example: '2024-01-01T00:00:00.000Z'
        expiresAt:
          format: date-time
          type: string
          description: Expiration timestamp
          example: '2024-01-02T00:00:00.000Z'
        status:
          type: string
          description: Payment link status
          example: PENDING
        inlineCustomer:
          type: object
          description: Payment link customer data
          example:
            name: John Doe
            email: john.doe@example.com
            phone: '+1234567890'
            idType: CO_CC
            idNumber: '1234567890'
        rail:
          type: object
          description: Payment link rail
          example: BRE_B
      required:
        - paymentLinkId
        - paymentLinkUrl
        - createdAt
        - expiresAt
        - status
        - inlineCustomer
        - rail
    CustomerDataDto:
      type: object
      properties:
        name:
          type: string
          description: Customer full name
          example: John Doe
        idType:
          type: string
          description: Type of identification document
          enum:
            - CO_CC
            - CO_CE
            - CO_NIT
            - MXN_RFC
            - PASSPORT
          example: CO_CC
        idNumber:
          type: string
          description: Identification document number
          example: '1234567890'
        phone:
          type: string
          description: Customer phone number
          example: '+573001234567'
        email:
          type: string
          description: Customer email address
          example: john.doe@example.com
      required:
        - name
        - idType
        - idNumber
        - phone
        - email
    PaymentLinkPseDto:
      type: object
      properties:
        bank:
          type: string
          description: PSE bank selected by the payer. Required when pse is provided.
          example: CO_BANCOLOMBIA
      required:
        - bank

````