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

# Create Payment Link

> Create and send a payment link

![klyme-widget-flow-example](https://storage.googleapis.com/klyme-misc/payment_links.png)


## OpenAPI

````yaml POST /payments/link
openapi: 3.1.0
info:
  title: OpenAPI Klyme
  description: The Klyme API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api-test.klyme.io/api/v1
  - url: https://api.klyme.io/api/v1
security:
  - basicAuth: []
paths:
  /payments/link:
    post:
      description: Create and send a payment link
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentLink'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLinkResponse'
components:
  schemas:
    PaymentLink:
      required:
        - merchantUuid
        - amount
        - currency
        - type
        - reference
      type: object
      properties:
        merchantUuid:
          type: string
        amount:
          type: number
          format: double
          example: 10.99
        currency:
          type: string
          enum:
            - GBP
            - EUR
        type:
          type: string
          enum:
            - EMAIL
            - SMS
            - EMSMS
            - LINK
          description: |-
            Determines how the payment link is delivered.

            `EMAIL` requires `email` to be specified.
            `SMS` requires `mobile` and `countryCallingCode` to be specified.
            `EMSMS` requires both `email` and `mobile` to be specified.
        reference:
          type: string
          minLength: 6
          maxLength: 36
        email:
          type: string
          format: email
          maxLength: 256
        mobile:
          type: number
          maxLength: 12
          description: >-
            Must not contain country code, leading zeros or `+` character.

            The parameter `countryCallingCode` is mandatory if specifying
            mobile.
          example: '7742123456'
        countryCallingCode:
          type: string
          maxLength: 2
          example: '44'
          description: Is mandatory if `mobile` has been specified.
        firstName:
          type: string
          maxLength: 64
        surname:
          type: string
          maxLength: 64
    PaymentLinkResponse:
      type: object
      properties:
        link:
          type: string
          example: https://lnk.klyme.io/a11de8
        date:
          type: string
          format: date-time
          example: '2025-09-08 15:05:12'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````