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

# Reactivate a payment link

> No body. Makes an `inactive` link payable again. A completed or expired link can't be changed (`409`).




## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/payment-links/{id}/reactivate
openapi: 3.1.0
info:
  title: PrimePay API
  version: '1.0'
  description: >-
    Collect mobile money payments, send transfers and make payouts with the
    PrimePay API.
servers:
  - url: https://api.primepay.mw
    description: Live API (live keys, `sk_live_…`)
  - url: https://sandbox-api.primepay.mw
    description: Sandbox API (test keys, `sk_test_…`)
security:
  - bearerAuth: []
tags:
  - name: Operators
  - name: Payments
  - name: Refunds
  - name: Transfers
  - name: Payouts
  - name: Payment links
  - name: Checkout sessions
paths:
  /v1/payment-links/{id}/reactivate:
    post:
      tags:
        - Payment links
      summary: Reactivate a payment link
      description: >
        No body. Makes an `inactive` link payable again. A completed or expired
        link can't be changed (`409`).
      operationId: reactivatePaymentLink
      parameters:
        - $ref: '#/components/parameters/PaymentLinkId'
      responses:
        '200':
          description: The link.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLink'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
components:
  parameters:
    PaymentLinkId:
      name: id
      in: path
      required: true
      schema:
        type: string
        example: 0b6f6a51-6f1e-4b0e-9a55-2f4f1c9d7e10
      description: The link's `id`.
  schemas:
    PaymentLink:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
          description: The checkout address to send to your customer.
        code:
          type: string
        status:
          type: string
          enum:
            - active
            - inactive
            - completed
            - expired
          description: >-
            `active`: can be paid. `inactive`: deactivated by you, can be
            reactivated. `completed`: a `once` link that has been paid (final).
            `expired`: its `expiresAt` has passed (final).
        liveMode:
          type: boolean
        name:
          type: string
        description:
          type: string
        amount:
          type: number
        currency:
          type: string
          example: MWK
        items:
          type: array
          items:
            $ref: '#/components/schemas/PaymentLinkItem'
        usage:
          type: string
          enum:
            - many
            - once
        timesPaid:
          type: integer
          description: The number of completed payments.
        collectName:
          type: boolean
        collectEmail:
          type: boolean
        redirectUrl:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        expiresAt:
          type:
            - string
            - 'null'
          format: date-time
        subMerchantAccountCode:
          type:
            - string
            - 'null'
        subMerchantName:
          type:
            - string
            - 'null'
    PaymentLinkItem:
      type: object
      required:
        - name
        - unitAmount
      properties:
        name:
          type: string
          maxLength: 200
        quantity:
          type: integer
          minimum: 1
          maximum: 9999
          default: 1
        unitAmount:
          type: number
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: insufficient_funds
            message:
              type: string
              example: Not enough available balance for MWK 25,000.00.
            field:
              type: string
              description: >-
                Payment links only. The field that is missing or wrong, for
                example `items[1].unitAmount`.
  responses:
    Error:
      description: An error. Use `code` in your code; show `message` to people.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Your API key: `sk_live_…` / `sk_test_…` (secret), `pk_live_…` /
        `pk_test_…` (publishable, read-only reference data) or `rk_live_…` /
        `rk_test_…` (payments only).

````

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