> ## 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.

# Delete a Payment Page

> Permanently deletes a payment page, making it unavailable for new payments.
<Warning>
  Only payment pages **with no successful or attempted payments** can be deleted.
  If the page has processed any payments, it **cannot be deleted** due to audit and reconciliation requirements.

  ➤ Instead, [mark the page as inactive](/api-reference/collect/payment-pages/inactive) to stop new payments while keeping it available for reference.
  </Warning>




## OpenAPI

````yaml DELETE /collect/payment_pages/{id}
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}:
    parameters:
      - $ref: '#/components/parameters/payment_page_id'
    delete:
      tags:
        - Payment Pages
      summary: Delete Payment Page
      description: >
        Permanently deletes a payment page, making it unavailable for new
        payments.

        <Warning>
          Only payment pages **with no successful or attempted payments** can be deleted.
          If the page has processed any payments, it **cannot be deleted** due to audit and reconciliation requirements.

          ➤ Instead, [mark the page as inactive](/api-reference/collect/payment-pages/inactive) to stop new payments while keeping it available for reference.
          </Warning>
      operationId: deleteHostedPaymentPage
      parameters:
        - $ref: '#/components/parameters/idempotency_key'
      responses:
        '204':
          description: Payment page deleted successfully
        '400':
          $ref: '#/components/responses/bad_request'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/not_found'
        '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
    idempotency_key:
      name: Idempotency-Key
      in: header
      required: true
      description: >
        A unique key to prevent duplicate operations. Use the same key for
        retries to ensure idempotent behavior.


        **Best Practices:**

        - Use UUIDs or other cryptographically unique identifiers

        - Maintain keys for at least 24 hours for retry scenarios

        - Use different keys for different operations

        - Monitor `Idempotent-Replayed` header for cache hits
      schema:
        type: string
        format: uuid
        minLength: 1
        maxLength: 255
        pattern: ^[a-zA-Z0-9-]+$
      example: 550e8400-e29b-41d4-a716-446655440000
  responses:
    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'
    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
    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.
  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
  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

        ```

````