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

> Permanently deletes a Payment Request, making it unavailable for payments. A Payment Request can not be deleted if the status is paid




## OpenAPI

````yaml DELETE /collect/payment_requests/{id}
openapi: 3.1.0
info:
  version: 1.0.0
  title: Payment Requests API
  description: >
    # Payment Requests API

    The Payment Requests API enables merchants to create, manage, and track
    Payment Requests for collecting payments from customers.
  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 Requests
    description: >
      Payment Requests allow you to collect payments from customers by sharing a
      URL that directs them to a secure payment page.
  - name: Webhooks
    description: >
      Webhook events that notify your application of changes to Payment Requests
      in real-time.

      Configure webhook endpoints in your merchant dashboard to receive these
      notifications.
externalDocs:
  description: API documentation
  url: https://docs.momentco.io
paths:
  /collect/payment_requests/{id}:
    parameters:
      - $ref: '#/components/parameters/payment_request_id'
    delete:
      tags:
        - Payment Requests
      summary: Delete Payment Request
      description: >
        Permanently deletes a Payment Request, making it unavailable for
        payments. A Payment Request can not be deleted if the status is paid
      operationId: delete_payment_request
      responses:
        '204':
          $ref: '#/components/responses/no_content'
          description: Payment Request deleted successfully
        '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_request_id:
      name: id
      in: path
      required: true
      description: >
        Unique identifier for the Payment Request. Must be a valid Payment
        Request ID.
      schema:
        $ref: '#/components/schemas/payment_request_id'
      example: pr_6phg74i4jG9wbzZbFDUQB
  responses:
    no_content:
      description: No Content
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
    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_request
                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_request
                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_request
                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_request
                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 Request does not exists:
              summary: Payment Request not found
              value:
                type: https://docs.momentco.io/errors/not-found
                title: Resource Not Found
                status: 404
                detail: The requested Payment Request does not exist.
                instance: /collect/payment_request/pl_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 Idempotency key
              value:
                type: https://docs.momentco.io/errors/conflict
                title: Conflict
                status: 409
                detail: >-
                  A Payment Request with the same idempotency key already
                  exists.
                instance: /collect/payment_request
                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_request
                code: internal_server_error
      headers:
        Request-Id:
          $ref: '#/components/headers/request_id'
  schemas:
    payment_request_id:
      type: string
      description: Unique identifier for the Payment Request.
      example: pr_6phg74i4jG9wbzZbFDUQB
    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

        ```

````