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

# Create a payment link

> <Note> If you can't create payment links, reach out to us at <a href='mailto:support@rocka.live'>support@rocka.live</a>.</Note>



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/payments/short-links
openapi: 3.0.1
info:
  title: Rocka Payments
  version: 1.0.0
  description: ''
  contact:
    email: support@rocka.live
servers:
  - url: https://api.stage.rocka.live
    description: Sandbox
  - url: https://api.rocka.live
    description: Live
security: []
paths:
  /api/payments/short-links:
    post:
      tags:
        - ShortLinks
      summary: Create a payment link
      operationId: ShortLinks_CreateShortLink
      requestBody:
        x-name: request
        content:
          application/json:
            examples:
              Payment link:
                value:
                  name: 'Order #123'
                  paymentDescription: 'Payment for order #123'
                  amount: 174
                  paymentId: order123-customer11
                  currency: EUR
                  webhookUrl: https://example.com/webhookUrl
                  returnUrl: https://example.com/returnUrl
                  expiryDate: '2026-08-11T05:31:56.000Z'
            schema:
              type: object
              additionalProperties: false
              properties:
                name:
                  type: string
                  description: >-
                    Link name. Your link will appear under this name in the
                    Payment Links section in your Rocka Hub. Up to 100 symbols.
                paymentDescription:
                  type: string
                  description: >-
                    Payment description that your customer will see in the
                    checkout form. Up to 255 symbols.
                amount:
                  format: decimal
                  type: number
                  description: Payment amount.
                paymentId:
                  type: string
                  description: >-
                    This payment's identifier in your system. If you provide it,
                    it'll be included in the webhook Rocka sends once the
                    payment is completed.
                currency:
                  type: string
                  description: Payment currency. For example, EUR.
                webhookUrl:
                  type: string
                  description: >-
                    Rocka sends a webhook to this URL whenever the payment's
                    status changes.
                returnUrl:
                  type: string
                  description: >-
                    The URL the customer is redirected to once the payment is
                    completed.
                expiryDate:
                  type: string
                  format: date-time
                  description: >-
                    This link's expiry date. By default, it'll expire in 30
                    days.
              required:
                - name
                - paymentDescription
                - paymentId
                - amount
                - currency
        required: true
        x-position: 1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: This link's unique identifier.
                  name:
                    type: string
                    description: Link name.
                  paymentDescription:
                    type: string
                    description: Payment description.
                  amount:
                    format: decimal
                    type: number
                    description: Payment amount.
                  currency:
                    type: string
                    description: Payment currency.
                  isActive:
                    type: boolean
                    description: Link status, either active or not.
                  createdDate:
                    type: string
                    format: date-time
                    description: Link creation timestamp.
                  shortLinkUrls:
                    type: object
                    properties:
                      shortLink:
                        type: string
                        description: Payment URL.
                      qrCodeLink:
                        type: string
                        description: QR code URL.
                  expiryDate:
                    type: string
                    format: date-time
                    description: Link expiration date. By default, links expire in 30 days.
              examples:
                EUR payment:
                  value:
                    id: IrXEFonH1a
                    name: 'Order #123'
                    paymentDescription: 'Payment for order #123'
                    amount: 174
                    currency: EUR
                    isActive: true
                    createdDate: '2026-05-08T11:34:34.1096921Z'
                    shortLinkUrls:
                      shortLink: https://stage.nd.link/IrXEFonH1a
                      qrCodeLink: https://stage.nd.link/IrXEFonH1a?qr
                    expiryDate: '2026-06-07T11:34:28.0289266Z'
        '400':
          description: One of the required parameters is missing or has an incorrect value.
        '500':
          description: All the required parameters are missing, so the request is invalid.
      security:
        - APIkey: []
components:
  securitySchemes:
    APIkey:
      description: >-
        To get your own API keys, go to the **Integration** tab in your [Rocka
        Hub](https://hub.rocka.live).
      in: header
      name: x-api-key
      type: apiKey

````