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

# Cancel



## OpenAPI

````yaml /openapi.yml post /api/v2/cancel/{transactionId}
openapi: 3.0.3
info:
  title: Gateway API
  version: v2
  contact:
    name: Support
    email: support@paybyrd.com
  license:
    name: Copyright © Paybyrd
  termsOfService: https://paybyrd.com/en/privacy
servers:
  - url: https://gateway.paybyrd.com
    description: Production
security:
  - authByApiKey: []
paths:
  /api/v2/cancel/{transactionId}:
    post:
      tags:
        - Transactions
      summary: Cancel
      operationId: api-transactions-cancel
      parameters:
        - name: transactionId
          in: path
          description: The transactionId that you want to cancel.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelRequest'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  $ref: '#/components/examples/CancelResponseExample'
              schema:
                $ref: '#/components/schemas/CancelResponse'
      deprecated: false
components:
  schemas:
    CancelRequest:
      type: object
    CancelResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/PaybyrdCode'
        description:
          $ref: '#/components/schemas/PaybyrdDescription'
        sourceTransaction:
          $ref: '#/components/schemas/CancelSourceTransactionResponse'
    PaybyrdCode:
      type: string
      description: >-
        Represents the Paybyrd code of the web request. To see more details
        check in [Return Codes](ref:appendix-return-codes) page.
      example: BYRD200
      enum:
        - BYRD010
        - BYRD200
        - BYRD201
        - BYRD203
        - BYRD205
        - BYRD206
        - BYRD207
        - BYRD208
        - BYRD230
        - BYRD231
        - BYRD240
        - BYRD290
        - BYRD291
        - BYRD292
        - BYRD294
        - BYRD299
        - BYRD401
        - BYRD403
        - BYRD900
        - BYRD901
        - BYRD999
    PaybyrdDescription:
      type: string
      example: Operation successfully completed
      description: >-
        Represents a textually the description of the Paybyrd code of the web
        request.  To see more details check in [Return
        Codes](ref:appendix-return-codes) page
      enum:
        - Request accepted
        - Operation successfully completed
        - Payment being processed. Waiting for shopper
        - >-
          An error occurred while processing the payment. Please query the
          transaction to confirm its status
        - Operation rejected
        - Operation blocked by velocity
        - Pending redirect
        - Payment canceled by the shopper
        - Payment already refunded
        - >-
          The refund amount exceeds the remaining balance of the original
          payment
        - Token is expired
        - >-
          An error occurred while pre processing the transaction. Please review
          your request and try again
        - >-
          An error occurred during while preparing transaction for acquiring.
          Please review your request and try again
        - >-
          No payment methods available for this operation. Please contact
          Paybyrd's support
        - >-
          Transaction could not be updated. Please review your request and try
          again
        - >-
          Operation could not be completed. Please review your request and try
          again
        - Resource access is forbidden
        - Resource access unauthorized
        - Invalid input
        - Resource not found
        - Operation failed
    CancelSourceTransactionResponse:
      type: object
      properties:
        amount:
          type: string
          example: '5.54'
        isoAmount:
          type: integer
          example: 554
          format: int64
        capturedAmount:
          type: string
          example: '0.00'
        isoCapturedAmount:
          type: integer
          example: 0
        increasedAmount:
          type: string
          example: '0.54'
        isoIncreasedAmount:
          type: integer
          example: 54
        refundedAmount:
          type: string
          example: '0.00'
        isoRefundedAmount:
          type: integer
          example: 0
        releasedAmount:
          type: string
          example: '0.00'
        isoReleasedAmount:
          type: integer
          example: 0
        remainingAmount:
          type: string
          example: '5.54'
        isoRemainingAmount:
          type: integer
          example: 554
        transactionId:
          type: string
          example: 33ff7bd9-1d6e-4bd0-bc2d-a4aef8614972
  examples:
    CancelResponseExample:
      value:
        code: BYRD200
        description: Operation successfully completed
        sourceTransaction:
          isoAmount: 554
          amount: '5.54'
          isoCapturedAmount: 0
          capturedAmount: '0.00'
          isoIncreasedAmount: 54
          increasedAmount: '0.54'
          isoRefundedAmount: 0
          refundedAmount: '0.00'
          isoReleasedAmount: 0
          releasedAmount: '0.00'
          isoRemainingAmount: 554
          remainingAmount: '5.54'
          transactionId: 33ff7bd9-1d6e-4bd0-bc2d-a4aef8614972
  securitySchemes:
    authByApiKey:
      type: apiKey
      in: header
      name: x-api-key

````