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

# Turn a payment link on or off



## OpenAPI

````yaml /openapi.json patch /payment-links/{id}/status
openapi: 3.0.3
info:
  title: LuminPay API
  version: 1.0.0
  description: >-
    Accept stablecoin and Bitcoin payments and settle in naira. Use a lmp_test_
    key with the Sandbox server and a lmp_live_ key with the Live server.
servers:
  - url: https://sandbox-api.luminpay.co
    description: Sandbox (testnet)
  - url: https://api.luminpay.co
    description: Live
security:
  - apiKey: []
tags:
  - name: Charges
  - name: Webhooks
  - name: Payment links
  - name: Invoices
  - name: Payouts
  - name: Refunds
paths:
  /payment-links/{id}/status:
    patch:
      tags:
        - Payment links
      summary: Turn a payment link on or off
      operationId: setPaymentLinkStatus
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: ''
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetPaymentLinkStatusRequest'
      responses:
        '200':
          description: The payment link
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLink'
        '400':
          $ref: '#/components/responses/E400'
        '401':
          $ref: '#/components/responses/E401'
        '403':
          $ref: '#/components/responses/E403'
        '404':
          $ref: '#/components/responses/E404'
components:
  schemas:
    SetPaymentLinkStatusRequest:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - active
            - inactive
    PaymentLink:
      type: object
      properties:
        id:
          type: string
          format: uuid
        slug:
          type: string
        url:
          type: string
          format: uri
          description: Share this with customers
        title:
          type: string
        description:
          type: string
          nullable: true
        amountType:
          type: string
          enum:
            - fixed
            - flexible
        fixedAmountNgn:
          type: string
          nullable: true
          description: Kobo
        successRedirectUrl:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - active
            - inactive
        paymentCount:
          type: integer
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        error:
          type: string
        code:
          type: string
  responses:
    E400:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E401:
      description: Missing, invalid or wrong-environment key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E403:
      description: >-
        Not allowed: verification, daily limit, or key management with an API
        key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E404:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: lmp_test_... or lmp_live_...
      description: >-
        Your secret API key from Developers → API keys. A key can be limited in
        the dashboard: read only (GET requests only), allowed IP addresses, and
        an expiry date. A request outside a limit is refused with 401 or 403 and
        a message saying which limit.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.