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

# Cancel Cash Receipt

> Fully cancel a cash receipt whose issuance processing was accepted. You can cancel it before its Hometax issuance is final, but not while the original request is `PENDING`. The API first returns `202 Accepted`. Check the final result via webhook or the status API.




## OpenAPI

````yaml /openapi.en.yaml post /v1/cashReceipts/{issuanceKey}/cancellation
openapi: 3.1.0
info:
  title: Bolta API
  description: >
    The Bolta e-tax invoice API. [API
    Overview](/en/docs/api-introduction/overview) | [Authentication
    guide](/en/docs/api-introduction/authentication) | [Use
    cases](/en/docs/api-introduction/usecase-b2b)
  version: 1.0.0
servers:
  - url: https://xapi.bolta.io
    description: Bolta API server
security:
  - basicAuth: []
tags:
  - name: Tax Invoice Issuance
    description: >
      Issue and amend e-tax invoices. [Calculating the issuance
      amount](/en/docs/api-introduction/issuance-guide) | [Amendment
      types](/en/docs/api-introduction/amendment-guide)
  - name: Tax Invoice Retrieval
    description: >
      Retrieve e-tax invoice results and request processing status, and download
      the PDF of an issued tax invoice. [Tax invoice PDF
      guide](/en/docs/api-introduction/tax-invoice-pdf)
  - name: Reverse Issuance
    description: >
      Request and manage reverse issuance of e-tax invoices. [Email-approval
      reverse issuance](/en/docs/api-introduction/usecase-reverse-email) |
      [Simple-approval reverse
      issuance](/en/docs/api-introduction/usecase-reverse-simple)
  - name: Cash Receipt
    description: >
      Issue, cancel, and check the status of cash receipts. [Cash receipt
      guide](/en/docs/api-introduction/cash-receipt-guide) | [Cash receipt
      webhooks](/en/docs/api-introduction/webhook-cash-receipt)
  - name: Business Registration Status
    description: >
      Check the registration status and tax type of a business registration
      number. Look up one number or up to 100 numbers at once. This API requires
      no issuer registration and no certificate. [Business registration status
      guide](/en/docs/api-introduction/business-registration-status)
  - name: Revenue and Expense
    description: >
      Retrieve the revenue and expense tax invoices of your own business in
      Bolta in the order they changed, and request a collection. Responses
      include documents issued through Bolta and documents collected from
      Hometax. You need a Standard plan or higher, and the calls deduct no
      points. Connect Hometax in the Bolta dashboard first. [Revenue and expense
      guide](/en/docs/api-introduction/revenue-expense)
  - name: Bank Account Transactions
    description: >
      Retrieve the bank accounts and transactions connected to your own business
      in Bolta, and request a sync. You need a Standard plan or higher, and the
      calls deduct no points. Connect bank accounts in the Bolta dashboard
      first. [Bank account transactions
      guide](/en/docs/api-introduction/bank-account-transactions)
  - name: Bank Account Holder
    description: >
      Look up account holder names with a bank code and an account number. One
      path takes a single account and the other takes up to 100 accounts at
      once. Each account that returns a holder name deducts 50 points. [Bank
      account holder guide](/en/docs/api-introduction/bank-account-holder)
  - name: Document Issuance
    description: >
      Issue National Tax Service certificates from Hometax or a certified copy
      of corporate registry, and download the original PDF. Hometax documents
      are issued only for the business that owns the API key, and you must
      register a joint certificate in the Bolta dashboard. A corporate registry
      is issued for the corporation in `corporationNumber` and needs no joint
      certificate. Supported corporation types are stock company, limited
      company, general partnership company, limited partnership company, limited
      liability company, incorporated association, incorporated foundation,
      medical corporation, cooperative (including social cooperative), and other
      corporate entity (such as a patent corporation). Each document deducts 500
      points for Hometax documents, 1,000 points for a corporate registry view
      copy, and 1,500 points for a submission copy. [Document issuance
      guide](/en/docs/api-introduction/document-issuance)
  - name: Issuer
    description: >
      Register and manage businesses that act as tax invoice issuers.
      Certificate requirements depend on the issuance type.
      [Glossary](/en/docs/api-introduction/glossary) | [Delegated
      issuance](/en/docs/api-introduction/usecase-delegated) | [Brokered Tax
      Invoice Issuance](/en/docs/api-introduction/usecase-brokered)
  - name: Certificate
    description: >
      Register and manage issuer certificates. [Certificate
      registration](/en/docs/api-introduction/certificate-registration)
paths:
  /v1/cashReceipts/{issuanceKey}/cancellation:
    post:
      tags:
        - Cash Receipt
      summary: Cancel Cash Receipt
      description: >
        Fully cancel a cash receipt whose issuance processing was accepted. You
        can cancel it before its Hometax issuance is final, but not while the
        original request is `PENDING`. The API first returns `202 Accepted`.
        Check the final result via webhook or the status API.
      parameters:
        - name: issuanceKey
          in: path
          description: >-
            Enter the original cash receipt's `issuanceKey` from the issuance
            response.
          required: true
          schema:
            type: string
        - name: Bolta-Client-Reference-Id
          in: header
          description: >-
            Enter a client reference ID between 1 and 255 characters that
            differs from the issuance request. The API uses this value as the
            cancellation request's idempotency key. If the same API key retries
            an identical cancellation request with the same client reference ID,
            the API returns `202 Accepted` with the existing request's
            `issuanceKey`. If the request content or type differs, the API
            returns `409 Conflict` with `IDEMPOTENCY_CONFLICT`. To check the
            status later, pass this value as `clientReferenceId`.
          required: true
          example: your-unique-reference-id-cancel
          schema:
            type: string
            minLength: 1
            maxLength: 255
            pattern: \S
        - name: Bolta-Webhook-Test-Code
          in: header
          description: >-
            Use this header only to reproduce a cancellation failure webhook
            with a test key. Enter a cancellation failure code, and the API
            sends the corresponding failure webhook. [Cash receipt
            webhooks](/en/docs/api-introduction/webhook-cash-receipt)
          required: false
          example: ORIGINAL_ISSUANCE_FAILED
          schema:
            type: string
            enum:
              - INVALID_ISSUER
              - INVALID_RECIPIENT_IDENTIFIER
              - ORIGINAL_ISSUANCE_FAILED
              - CANCELLATION_TARGET_NOT_FOUND
              - UNKNOWN
      responses:
        '202':
          description: The API accepted the cancellation request.
          headers:
            Location:
              description: Path to check the processing status
              schema:
                type: string
                examples:
                  - >-
                    /v1/cashReceipts/status?clientReferenceId=your-unique-reference-id-cancel
          content:
            application/json:
              schema:
                type: object
                properties:
                  issuanceKey:
                    $ref: '#/components/schemas/CashReceiptIssuanceKey'
                  originalIssuanceKey:
                    $ref: '#/components/schemas/CashReceiptIssuanceKey'
                required:
                  - issuanceKey
                  - originalIssuanceKey
              example:
                issuanceKey: 9XK21ABC5KOAEIPGK8U6UO05I3EAQPLI8OE78Z1Q
                originalIssuanceKey: MRK98JGC5KOAEIPGK8U6UO05I3EAQPLI8OE78A3I
        '400':
          description: >-
            The original request was not found, the request owner or supplier
            does not match, or the original status cannot be canceled. The
            response `code` is `INVALID_REQUEST`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: API key authentication failed
        '403':
          description: >-
            The client does not have access to the issuer. The response `code`
            is `FORBIDDEN`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            An idempotency conflict, cancellation while the original request is
            `PENDING`, or a duplicate active cancellation request. The response
            `code` is `IDEMPOTENCY_CONFLICT`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            Temporary internal API communication error. The response `code` is
            `SERVICE_UNAVAILABLE`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      deprecated: false
components:
  schemas:
    CashReceiptIssuanceKey:
      type: string
      description: >-
        The cash receipt issuance key. Its format and length may change, so
        store the entire string as is.
      examples:
        - MRK98JGC5KOAEIPGK8U6UO05I3EAQPLI8OE78A3I
    ErrorResponse:
      type: object
      description: The error response returned when an API request fails
      properties:
        code:
          type: string
          description: Error type identifier
        message:
          type: string
          description: Error description
        traceId:
          type: string
          description: Request trace identifier
      required:
        - code
        - message
        - traceId
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Append a colon to your API key, Base64-encode it, and put it in the
        header. Enter the API key as the username and leave the password empty.

````