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

# Cancel



## OpenAPI

````yaml POST /payment-intent/{id}/cancel
openapi: 3.1.0
info:
  title: Compago API
  version: 1.0.0
  description: >-
    Public and private API endpoints for Compago's payment infrastructure. This
    specification currently includes endpoints for one-time payments. More
    endpoints will be added as the platform evolves.
servers:
  - url: https://demo.api.harmony.compago.com/api
  - url: https://api.harmony.compago.com/api
security: []
tags:
  - name: OneTimePayment
    description: Endpoints for creating and processing one-time payment links
  - name: PaymentMethod
    description: >-
      Endpoints for saving cards, charging saved payment methods, and processing
      refunds
  - name: PaymentIntent
    description: >-
      Endpoints for creating and managing card-present payment intents for POS
      terminal integrations
paths:
  /payment-intent/{id}/cancel:
    post:
      tags:
        - PaymentIntent
      summary: Cancel a payment intent
      operationId: cancelPaymentIntent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The unique identifier of the payment intent to cancel
      responses:
        '200':
          description: Payment intent cancelled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelPaymentIntentResponse'
        '400':
          description: Cannot cancel payment intent (already CONFIRMED)
        '401':
          description: Unauthorized – missing or invalid API key
        '404':
          description: Payment intent not found
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CancelPaymentIntentResponse:
      type: object
      description: Empty response on successful cancellation
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````