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

# Change a Payment Page to Inactive

> Marks a payment page as inactive, preventing new payments but keeping the page in record for reference.




## OpenAPI

````yaml PATCH /collect/payment_pages/{id}/inactive
openapi: 3.1.0
info:
  title: Moment Payment Pages API
  version: 1.0.0
  description: >
    # Moment Payment Pages API


    The Moment Payment Pages API enables merchants to create, manage, and track
    payment pages for collecting payments from customers. This RESTful API
    provides comprehensive functionality for payment page lifecycle management
    with enterprise-grade reliability and security.
  contact:
    name: Moment
    url: https://momentco.net
    email: support@momentco.net
servers:
  - url: https://api.momentpay.net
    description: Production server
security:
  - BearerAuth: []
tags:
  - name: Payment Pages
    description: >
      Operations for managing payment pages. Payment pages provide a secure,

      customizable interface for collecting payments with optional customer data
      collection.
  - name: Payment Page Transactions
    description: >
      Operations for retrieving transaction history and payment details
      associated

      with payment pages.
  - name: Webhooks
    description: >
      Webhook events that notify your application of payment events in
      real-time.

      Configure webhook endpoints in your merchant dashboard to receive these
      notifications.
externalDocs:
  description: Complete API Documentation
  url: https://docs.momentco.io/
paths:
  /collect/payment_pages/{id}/inactive:
    parameters:
      - $ref: '#/components/parameters/payment_page_id'
    patch:
      tags:
        - Payment Pages
      summary: Mark Payment Page as Inactive
      description: >
        Marks a payment page as inactive, preventing new payments but keeping
        the page in record for reference.
      operationId: markPaymentPageInactive
      responses:
        '200':
          $ref: '#/components/responses/payment_page_marked_inactive'
        '400':
          $ref: '#/components/responses/bad_request'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/not_found'
        '409':
          $ref: '#/components/responses/conflict'
        '500':
          $ref: '#/components/responses/internal_server_error'
components:
  parameters:
    payment_page_id:
      name: id
      in: path
      required: true
      description: |
        Unique identifier for the payment page. Must be a valid payment page ID.
      schema:
        $ref: '#/components/schemas/payment_page_id'
      example: pp_SjSA234ADKA25245ADJKS
  responses:
    payment_page_marked_inactive:
      description: Payment page marked as inactive successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/hosted_payment_page'
          examples:
            Inactive Payment Page:
              summary: Hosted payment page inactivated
              description: Example of a payment page successfully marked as inactive
              value:
                id: pp_EVT9283NAKSD8234SKJD
                status: inactive
                page_url: https://pages.momentpay.io/WELLNESS2025
                amount: 15000
                currency: KES
                title: Wellness Retreat - Nairobi
                description: One-day guided wellness and meditation retreat
                return_url: https://retreats.example.com/thank-you
                requires_customer_details: true
                requires_delivery_details: true
                products:
                  - product_15321
                  - product_45323
                  - product_654321
                metadata:
                  event_id: wellness_nairobi_2025
                  category: event_registration
                custom_fields:
                  - key: session_choice
                    label: Preferred Session
                    type: dropdown
                    required: true
                    options:
                      - Morning (8AM–12PM)
                      - Afternoon (2PM–6PM)
                  - key: dietary_restrictions
                    label: Any Dietary Restrictions?
                    type: text
                    required: false
                  - key: referral_code
                    label: Referral Code
                    type: text
                    required: false
                created_at: '2025-06-16T10:30:00Z'
                updated_at: '2025-06-28T15:45:00Z'
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
        Idempotent-Replayed:
          $ref: '#/components/headers/idempotent_replayed'
        Location:
          description: URL of the created payment page resource
          schema:
            type: string
            format: uri
          example: /collect/payment_pages/pp_SjSA234ADKA25245ADJKS
    bad_request:
      description: Bad Request - Invalid request parameters or malformed request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem_detail'
          examples:
            Invalid Currency:
              summary: Invalid currency code
              value:
                type: https://docs.momentco.io/errors/bad-request
                title: Bad Request
                status: 400
                detail: The currency field must be a valid ISO 4217 currency code.
                instance: /collect/payment_pages
                code: bad_request
            Invalid Amount:
              summary: Invalid amount
              value:
                type: https://docs.momentco.io/errors/bad-request
                title: Bad Request
                status: 400
                detail: The amount field must be a positive integer
                instance: /collect/payment_pages
                code: bad_request
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
    unauthorized:
      description: Unauthorized - Invalid or missing authentication credentials
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem_detail'
          examples:
            unauthorized:
              summary: Invalid API key
              value:
                type: https://docs.momentco.io/errors/unauthorized
                title: Unauthorized
                status: 401
                detail: The API key provided is invalid.
                instance: /collect/payment_pages
                code: unauthorized
            missing_authorization:
              summary: Missing authorization header
              value:
                type: https://docs.momentco.io/errors/unauthorized
                title: Unauthorized
                status: 401
                detail: Authorization header is required.
                instance: /collect/payment_pages
                code: missing_authorization
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
    not_found:
      description: Resource not Found - The requested resource does not exist
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem_detail'
          examples:
            Payment Page Does not exists:
              summary: Payment page not found
              value:
                type: https://docs.momentco.io/errors/not-found
                title: Resource Not Found
                status: 404
                detail: The requested payment page does not exist.
                instance: /collect/payment_pages/pp_nonexistent123
                code: resource_not_found
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
    conflict:
      description: Conflict - Resource state conflict or duplicate resource
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem_detail'
          examples:
            Duplicate Idempotency key:
              summary: Duplicate payment page title
              value:
                type: https://docs.momentco.io/errors/conflict
                title: Conflict
                status: 409
                detail: A payment page with the same idempotency key already exists.
                instance: /collect/payment_pages
                code: conflict
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
    internal_server_error:
      description: Internal Server Error - An unexpected error occurred
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem_detail'
          examples:
            Internal Server Error:
              summary: Internal server error
              value:
                type: https://docs.momentco.io/errors/internal-server-error
                title: Internal Server Error
                status: 500
                detail: An unexpected error occurred. Please try again later.
                instance: /collect/payment_pages
                code: internal_server_error
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
  schemas:
    payment_page_id:
      type: string
      description: Unique identifier for a payment page
      example: pp_SjSA234ADKA25245ADJKS
    hosted_payment_page:
      type: object
      description: >
        A payment page represents a configurable payment collection interface
        that can be shared with customers.
      properties:
        id:
          $ref: '#/components/schemas/payment_page_id'
        status:
          $ref: '#/components/schemas/status'
        page_url:
          $ref: '#/components/schemas/payment_page_url'
        amount:
          oneOf:
            - $ref: '#/components/schemas/amount'
            - type: 'null'
          description: >-
            Fixed amount for the payment page (null if variable amount/catalog
            support)
        currency:
          $ref: '#/components/schemas/currency'
        title:
          $ref: '#/components/schemas/title'
        description:
          oneOf:
            - $ref: '#/components/schemas/description'
            - type: 'null'
        return_url:
          oneOf:
            - $ref: '#/components/schemas/return_url'
            - type: 'null'
        requires_customer_details:
          $ref: '#/components/schemas/requires_customer_details'
        requires_delivery_details:
          type: boolean
          description: >
            Indicates whether delivery details (e.g., shipping address) are
            required for this payment page.
          example: true
          default: false
        products:
          type: array
          description: >-
            List of product identifiers linked to this payment page. The Product
            identifiers are fetched from the catalog.
          items:
            type: string
            example: product_15321
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/custom_field'
          description: Custom fields for collecting additional information
        metadata:
          oneOf:
            - $ref: '#/components/schemas/metadata_fields'
            - type: 'null'
        created_at:
          $ref: '#/components/schemas/created_at'
        updated_at:
          $ref: '#/components/schemas/updated_at'
      additionalProperties: false
    problem_detail:
      title: Problem Detail Object
      type: object
      properties:
        type:
          type: string
          description: >
            A URI reference that identifies the problem type. This URI should
            provide human-readable documentation for the problem type.
        title:
          type: string
          description: |
            A short, human-readable summary of the problem type.
        status:
          type: integer
          description: |
            The HTTP status code applicable to this problem.
        detail:
          type: string
          description: >
            A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          description: >
            A URI reference that identifies the specific occurrence of the
            problem.
        code:
          type: string
          description: A machine-readable code that describes the specific error condition
          enum:
            - bad_request
            - conflict
            - unauthorized
            - missing_authorization
            - operation_not_allowed
            - resource_not_found
            - resource_already_exists
            - bill_already_voided
            - internal_server_error
            - payment_not_found
          example: bad_request
      required:
        - type
        - title
        - status
      description: |
        A standardized format for problem details, following RFC 9457.
    status:
      type: string
      description: Status of a payment page
      enum:
        - active
        - inactive
        - expired
      example: active
      default: active
    payment_page_url:
      type: string
      format: uri
      description: The URL where customers can access the payment page
      example: https://pages.momentpay.io/PLSST12FWF
    amount:
      title: Amount
      type: integer
      description: >
        The amount to be charged in the smallest currency unit. For example,
        *20.00 ZAR* is represented as *2000 cents*.   Learn more about [minor
        units](/api-reference/basics/monetary_amounts#minor-units-explained).
      example: 1000
    currency:
      title: Currency
      type: string
      description: The ISO 4217 currency code for the payment.
      example: ZAR
    title:
      type: string
      description: Title displayed on the payment page
      maxLength: 200
      example: My Shop
    description:
      type: string
      description: Description displayed on the payment page
      maxLength: 1000
      example: High-quality cotton t-shirt with custom design
    return_url:
      type: string
      format: uri
      description: >
        (Optional) The URL to redirect the customer to when they press the back
        button on the payment page. If this field is not supplied, the back
        button will be hidden. Must be a valid HTTPS URL.
      pattern: ^https://.+$
      maxLength: 500
      example: https://store.com/home
    requires_customer_details:
      type: boolean
      description: >
        Indicates whether the payment page should explicitly require customer
        details. By default, the page collects the customer's name, email, and
        phone number. This flag can be set to `false` to hide or skip these
        fields if not needed.
      example: true
      default: true
    custom_field:
      type: object
      description: Configuration for a custom field on the payment page
      properties:
        key:
          type: string
          description: Unique identifier for the field
          pattern: ^[a-zA-Z0-9_]+$
          maxLength: 50
          example: notification_preference
        label:
          type: string
          description: Display label for the field
          maxLength: 100
          example: Notification Preference
        type:
          type: string
          description: Type of input field
          enum:
            - text
            - textarea
            - dropdown
            - checkbox
            - radio
          example: dropdown
        required:
          type: boolean
          description: Whether the field is required
          example: true
        options:
          type: array
          items:
            type: string
            maxLength: 100
          description: Available options for dropdown/radio fields
          example:
            - SMS
            - Email
      required:
        - key
        - label
        - type
        - required
      additionalProperties: false
    metadata_fields:
      type: object
      description: >
        Set of key-value pairs that you can attach to an object. This can be
        useful

        for storing additional information about the object in a structured
        format.

        NEW

        **Limitations:**

        - Maximum 20 keys

        - Key names must be strings (max 40 characters)

        - Values must be strings (max 500 characters)
      additionalProperties:
        type: string
      example:
        customer_id: cust_123456
        order_id: ord_789012
    created_at:
      type: string
      format: date-time
      description: ISO 8601 timestamp when the resource was created
      example: '2025-06-16T10:30:00Z'
    updated_at:
      type: string
      format: date-time
      description: ISO 8601 timestamp when the resource was last updated
      example: '2025-06-16T10:30:00Z'
  headers:
    request_id:
      description: >
        A unique identifier for the request, used for tracing and debugging
        purposes.

        This `Request-Id` is included in every response to enable request
        tracing across multiple services or systems.

        It helps correlate logs and track the flow of requests through
        distributed systems.

        The value is typically a universally unique identifier (UUID) to ensure
        uniqueness across requests.
      schema:
        type: string
        examples:
          - 63efe730-f599-40a5-afb7-9dda5fc31773
    idempotent_replayed:
      description: >
        Indicates whether this response is a replay of a previous request due to
        idempotency.


        When `true`, the response is being returned from cache based on the
        Idempotency-Key provided in the request.
      schema:
        type: boolean
      example: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Authentication using Bearer tokens. Include your API key in the
        Authorization header.


        **Key Types:**

        - **Test Keys**: `sk_test_*` for development and testing

        - **Live Keys**: `sk_*` for production environments

        - **Public Keys**: `pk_test_*` or `pk_*` for client-side operations



        > 📩 **Need access?** [Contact Support](/documentation/support) to
        request your API keys.



        **Usage:**

        ```http

        Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc

        ```

````