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

# Get payment link orders

> Retrieve orders associated with a payment link. Useful for getting the order ID for payment simulation in staging.



## OpenAPI

````yaml get /paymentlink/orders
openapi: 3.0.1
info:
  title: Mavapay API
  description: API documentation for Mavapay
  license:
    name: MIT
  version: 1.0.0
  contact:
    name: Mavapay
    url: https://mavapay.co
    email: info@mavapay.co
servers:
  - url: https://staging.api.mavapay.co/api/v1
    description: Staging server
  - url: https://api.mavapay.co/api/v1
    description: Live server
security:
  - ApiKeyAuth: []
    bearerAuth: []
tags:
  - name: Price
    description: Price related endpoints
  - name: Payment Link
    description: Payment Link endpoints for creating and managing hosted payment pages
paths:
  /paymentlink/orders:
    get:
      tags:
        - Payment Link
      summary: Get payment link orders
      description: >-
        Retrieve orders associated with a payment link. Useful for getting the
        order ID for payment simulation in staging.
      operationId: getPaymentLinkOrders
      parameters:
        - name: id
          in: query
          description: The payment link ID (paymentRef) to get orders for
          schema:
            type: string
            format: uuid
          required: true
          example: 9f8bf7da-f1d8-4c78-8f93-28eebe17c35e
      responses:
        '200':
          description: Payment link order details
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  message:
                    type: string
                    example: paymentlink order details
                  data:
                    $ref: '#/components/schemas/PaymentLinkOrderDetails'
              examples:
                paymentLinkOrdersResponse:
                  summary: Payment Link Orders Response
                  value:
                    status: ok
                    message: paymentlink order details
                    data:
                      id: 7e644e02-e652-42d8-8857-e8ae46bccd59
                      name: Small payment for Solomon
                      description: Small Payment for Demo Purposes
                      type: ONE_TIME
                      amount: '2000000'
                      fee: null
                      addFeeToTotalCost: false
                      settlementCurrency: BTC
                      settlementMethod: ONCHAIN
                      speed: medium
                      paymentCurrency: NGN
                      paymentMethods:
                        - BANKTRANSFER
                      callbackUrl: https://mavapay.co/login
                      channel: API
                      status: ACTIVE
                      accountId: 1a0f79fb-0f3e-4b5b-98f1-1e14324ca62e
                      expiresAt: null
                      invoice: null
                      companyLogo: null
                      beneficiaryId: >-
                        bc1q8yz7u50r4nne2q8wkuc4kyxx0s76fxsjlac5fxd8h7tzkh4rs82qnweuv5
                      createdAt: '2026-01-09T12:36:09.582Z'
                      updatedAt: '2026-01-09T12:36:09.582Z'
                      orders:
                        - id: eb1377a8-5afd-4888-a702-d510d070466b
                          status: EXPIRED
                          orderId: 49508-6205
                          paymentLinkId: 7e644e02-e652-42d8-8857-e8ae46bccd59
                          paymentMethod: BANKTRANSFER
                          createdAt: '2026-01-09T12:36:25.924Z'
                          updatedAt: '2026-01-09T12:47:10.254Z'
                        - id: 35a153c9-dff0-4cb5-a603-e494965ed6ad
                          status: PENDING
                          orderId: 17454-1571
                          paymentLinkId: 7e644e02-e652-42d8-8857-e8ae46bccd59
                          paymentMethod: BANKTRANSFER
                          createdAt: '2026-01-09T13:09:59.212Z'
                          updatedAt: '2026-01-09T13:09:59.212Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    PaymentLinkOrderDetails:
      type: object
      description: Complete payment link details including associated orders
      properties:
        id:
          type: string
          format: uuid
          description: Payment link ID
          example: 7e644e02-e652-42d8-8857-e8ae46bccd59
        name:
          type: string
          description: Name of the payment link
          example: Small payment for Solomon
        description:
          type: string
          description: Description of the payment
          example: Small Payment for Demo Purposes
        type:
          type: string
          enum:
            - ONE_TIME
            - RECURRING
          description: Type of payment link
          example: ONE_TIME
        amount:
          type: string
          description: Amount in lowest denomination of the payment currency
          example: '2000000'
        fee:
          type: string
          nullable: true
          description: Fee amount if applicable
          example: null
        addFeeToTotalCost:
          type: boolean
          description: Whether fees are added to total cost
          example: false
        settlementCurrency:
          type: string
          description: Currency for settlement
          example: BTC
        settlementMethod:
          type: string
          enum:
            - ONCHAIN
            - LIGHTNING
          description: Settlement method
          example: ONCHAIN
        speed:
          type: string
          enum:
            - slow
            - medium
            - fast
          description: Network fee priority for on-chain transactions
          example: medium
        paymentCurrency:
          type: string
          description: Currency the user pays in
          example: NGN
        paymentMethods:
          type: array
          items:
            type: string
          description: Accepted payment methods
          example:
            - BANKTRANSFER
        callbackUrl:
          type: string
          format: uri
          description: Redirect URL where users are sent after payment completion
          example: https://your-app.com/payment-success
        channel:
          type: string
          description: Channel through which payment link was created
          example: API
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - EXPIRED
          description: Payment link status
          example: ACTIVE
        accountId:
          type: string
          format: uuid
          description: Account ID of the payment link owner
          example: 1a0f79fb-0f3e-4b5b-98f1-1e14324ca62e
        expiresAt:
          type: string
          format: date-time
          nullable: true
          description: Expiration time of the payment link
          example: null
        invoice:
          type: string
          nullable: true
          description: Lightning invoice if applicable
          example: null
        companyLogo:
          type: string
          nullable: true
          description: Company logo URL
          example: null
        beneficiaryId:
          type: string
          description: Beneficiary identifier (Bitcoin address or Lightning address)
          example: bc1q8yz7u50r4nne2q8wkuc4kyxx0s76fxsjlac5fxd8h7tzkh4rs82qnweuv5
        createdAt:
          type: string
          format: date-time
          description: Payment link creation time
          example: '2026-01-09T12:36:09.582Z'
        updatedAt:
          type: string
          format: date-time
          description: Payment link last update time
          example: '2026-01-09T12:36:09.582Z'
        orders:
          type: array
          description: >-
            List of orders associated with this payment link. A new order is
            created when a previous order expires.
          items:
            $ref: '#/components/schemas/PaymentLinkOrder'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        status:
          type: string
          format: string
          example: error
        message:
          type: string
    PaymentLinkOrder:
      type: object
      description: An order associated with a payment link
      properties:
        id:
          type: string
          format: uuid
          description: Unique order identifier
          example: eb1377a8-5afd-4888-a702-d510d070466b
        status:
          type: string
          enum:
            - PENDING
            - PAID
            - EXPIRED
            - FAILED
          description: Order status
          example: PENDING
        orderId:
          type: string
          description: Order ID for tracking and simulation
          example: 49508-6205
        paymentLinkId:
          type: string
          format: uuid
          description: Associated payment link ID
          example: 7e644e02-e652-42d8-8857-e8ae46bccd59
        paymentMethod:
          type: string
          description: Payment method used
          example: BANKTRANSFER
        createdAt:
          type: string
          format: date-time
          description: Order creation time
          example: '2026-01-09T12:36:25.924Z'
        updatedAt:
          type: string
          format: date-time
          description: Order last update time
          example: '2026-01-09T12:47:10.254Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    bearerAuth:
      type: http
      scheme: bearer

````