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

# POST /v1/payment/{id}/cancel



## OpenAPI

````yaml POST /v1/payment/{id}/cancel
openapi: 3.1.0
info:
  title: Finsei API
  description: API documentation for Finsei
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.sandbox.finsei.com
security:
  - bearerAuth: []
paths:
  /v1/payment/{id}/cancel:
    post:
      tags:
        - payment
      summary: Cancel payment
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: Either payment id (integer) or payment uuid (UUID string)
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - bearerAuth: []
components:
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
                example: Unauthorized
              message:
                type: string
                example: Your request was made with invalid credentials.
              status:
                type: integer
                example: 401
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
                example: Forbidden
              message:
                type: string
                example: String
              status:
                type: integer
                example: 403
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
                example: Not Found
              message:
                type: string
                example: The requested resource could not be found.
              status:
                type: integer
                example: 404
          example:
            status: ERROR
            error:
              code: 404
              message: Not Found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````