> ## Documentation Index
> Fetch the complete documentation index at: https://developer.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 others.

This endpoint allows platforms to:
- Create a new payment link for a verified 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/platform/payment/create-payment-link/{user_id}
openapi: 3.1.0
info:
  title: paywint
  version: 0.1.0
servers:
  - url: http://localhost:8001
  - url: https://api.pw.wintpay.com
  - url: https://test.pw.wintpay.com
  - url: https://api.sandbox.paywint.com
security: []
paths:
  /api/platform/payment/create-payment-link/{user_id}:
    post:
      tags:
        - Platform payment
      summary: Create a Payment Link
      description: >-
        Generates a secure payment link to collect wallet-based payments from
        others.


        This endpoint allows platforms to:

        - Create a new payment link for a verified 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_platform_payment_create_payment_link__user_id__post
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              Unique identifier (UUID) of the user whose payment records are
              being retrieved.
            title: User Id
          description: >-
            Unique identifier (UUID) of the user whose payment records are being
            retrieved.
          example: f47ac10b-****-****-****-0e02b2c3d479
        - name: X-Platform-ID
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              Unique platform identifier (UUID). You receive this during
              onboarding. Must be sent with every API request.
            title: X-Platform-Id
          description: >-
            Unique platform identifier (UUID). You receive this during
            onboarding. Must be sent with every API request.
        - name: X-Signature
          in: header
          required: true
          schema:
            type: string
            description: >-
              HMAC-SHA256 request signature for authentication. Use your
              platform secret key to compute it as: `METHOD + PATH + QUERY +
              BODY_HASH`.
            title: X-Signature
          description: >-
            HMAC-SHA256 request signature for authentication. Use your platform
            secret key to compute it as: `METHOD + PATH + QUERY + BODY_HASH`.
      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: 1782303609.673092
          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

````