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

# Create Payment Link

> Generates a secure payment link to collect wallet-based payments from customers or external users.

This endpoint:
- Creates a new pending payment request for the user
- Provides a shareable URL that can be sent to others for payment collection
- Returns the generated payment ID and link



## OpenAPI

````yaml POST /api/user-api/payment/create-payment-link
openapi: 3.1.0
info:
  title: paywint
  version: 0.1.0
servers:
  - url: https://api.sandbox.paywint.com
  - url: https://api.paywint.com
security: []
paths:
  /api/user-api/payment/create-payment-link:
    post:
      tags:
        - Developer API payment
      summary: Create a Payment Link
      description: >-
        Generates a secure payment link to collect wallet-based payments from
        customers or external users.


        This endpoint:

        - Creates a new pending payment request for the user

        - Provides a shareable URL that can be sent to others for payment
        collection

        - Returns the generated payment ID and link
      operationId: create_payment_link_api_user_api_payment_create_payment_link_post
      parameters:
        - name: X-Api-Key
          in: header
          required: true
          schema:
            type: string
            description: >-
              Your API Key (UUID format). Required to identify and authorize
              each request
            title: X-Api-Key
          description: >-
            Your API Key (UUID format). Required to identify and authorize each
            request
        - name: X-Api-Secret
          in: header
          required: true
          schema:
            type: string
            description: >-
              Secret associated with your API Key. Used for authenticating
              requests. Keep this secure.
            title: X-Api-Secret
          description: >-
            Secret associated with your API Key. Used for authenticating
            requests. Keep this secure.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalApiPaymentLinkCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CommonResponse_ExternalApiPaymentLinkRead_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ExternalApiPaymentLinkCreateRequest:
      properties:
        amount:
          type: number
          exclusiveMinimum: 0
          title: Amount
          description: Amount to be collected via the payment link.
          example: 150.75
        description:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Description
          description: >-
            Optional note or context about the payment (e.g., product name,
            service details).
          example: Payment for June invoice
        invoice_number:
          anyOf:
            - type: string
              maxLength: 20
            - type: 'null'
          title: Invoice Number
          description: Optional invoice reference tied to this payment request.
          example: INV-2025-0012
      type: object
      required:
        - amount
      title: ExternalApiPaymentLinkCreateRequest
    CommonResponse_ExternalApiPaymentLinkRead_:
      properties:
        success:
          type: boolean
          title: Success
          description: Indicates whether the request was processed successfully.
          default: true
          example: true
        message:
          type: string
          title: Message
          description: >-
            A short, human-readable message describing the result of the
            request.
          default: Success
          example: Operation completed.
        data:
          anyOf:
            - $ref: '#/components/schemas/ExternalApiPaymentLinkRead'
            - type: 'null'
          description: The main response payload, if applicable
        queryGeneratedTime:
          anyOf:
            - type: number
            - type: 'null'
          title: Querygeneratedtime
          description: >-
            The Unix timestamp (in seconds) indicating when the response was
            generated.
          default: 1778161546.973489
          example: 1718006400
      type: object
      title: CommonResponse[ExternalApiPaymentLinkRead]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExternalApiPaymentLinkRead:
      properties:
        payment_id:
          type: string
          format: uuid
          title: Payment Id
          description: Unique ID of the created payment request
        payment_link:
          type: string
          title: Payment Link
          description: Full URL for the payment page
      type: object
      title: ExternalApiPaymentLinkRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````