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

# Delete transactions

> Please provide at least one of the following parameters: heron_ids, heron_id, request_id or end_user_id.




## OpenAPI

````yaml https://app.herondata.io/swagger delete /api/transactions
openapi: 3.0.0
info:
  contact:
    email: support@herondata.io
    name: Support
  title: Heron Data API
  version: '2021-07-19'
servers:
  - description: Production
    url: https://app.herondata.io
security:
  - ApiKeyAuth:
      - key_XXX
externalDocs:
  description: Read Tutorial
  url: https://docs.herondata.io/
paths:
  /api/transactions:
    delete:
      tags:
        - Transactions
      summary: Delete transactions
      description: >
        Please provide at least one of the following parameters: heron_ids,
        heron_id, request_id or end_user_id.
      parameters:
        - description: (legacy) Heron ID of transaction to be deleted
          in: query
          name: heron_id
          required: false
          schema:
            example: txn_9jfXLcJY9rvPN9oyS5ie3X
            nullable: true
            type: string
        - description: Heron IDs of transactions to be deleted
          explode: true
          in: query
          name: heron_ids
          required: false
          schema:
            default: []
            items:
              type: string
            type: array
          style: form
        - description: Reference IDs of transactions to be deleted
          explode: true
          in: query
          name: reference_ids
          required: false
          schema:
            default: []
            items:
              type: string
            type: array
          style: form
        - description: Request ID of transactions to be deleted
          in: query
          name: request_id
          required: false
          schema:
            nullable: true
            type: string
        - description: end_user_id of transactions to be deleted
          in: query
          name: end_user_id
          required: false
          schema:
            nullable: true
            type: string
        - description: account_id of transactions to be deleted
          in: query
          name: account_id
          required: false
          schema:
            nullable: true
            type: string
        - description: if true, deletes only transactions that are marked as duplicates
          in: query
          name: only_duplicates
          required: false
          schema:
            nullable: true
            type: boolean
      responses:
        '202':
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                type: object
          description: OK
      callbacks:
        onData:
          $yourWebhookUrl:
            post:
              requestBody:
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/TransactionDeleteWebhook'
                      type: object
                description: Webhook payload with transactions
              responses:
                '200':
                  description: >-
                    Your webhook implementation should return this HTTP status
                    code

                    if the data was received successfully.
              method: post
              type: path
            path: $yourWebhookUrl
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TransactionDeleteWebhook:
      properties:
        created:
          description: time webhook was sent
          example: '2026-07-11T16:08:47.058861'
          format: date-time
          type: string
        data:
          allOf:
            - $ref: '#/components/schemas/TransactionDeleteReference'
          description: payload of the webhook
        meta:
          additionalProperties: {}
          description: meta information about the webhook
          type: object
        topic:
          description: topic of webhook
          example: transactions.deleted
          type: string
      type: object
    TransactionDeleteReference:
      properties:
        transactions:
          description: list of transactions (only ids) that have been deleted
          items:
            $ref: '#/components/schemas/Transaction2'
          type: array
      type: object
    Transaction2:
      properties:
        heron_id:
          description: Unique ID of transaction; generated by Heron Data
          example: txn_ESjs3xSmh6C86u8xCE2seR
          readOnly: true
          type: string
        reference_id:
          description: Your unique ID for transaction
          example: my_favourite_transaction_231098
          maxLength: 140
          minLength: 1
          nullable: true
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````