---
title: "POST /api/transactions/{id}/cancellations"
method: POST
path: "/api/transactions/{id}/cancellations"
tags: ["api", "transactions"]
---

# POST /api/transactions/{id}/cancellations

`POST /api/transactions/{id}/cancellations`

Create a Transaction cancellation

## Path parameters

- `id` string, required — The ID of the transaction

## Request body

- object
  - `items` union, required
    - string[]
    - object[]
      - `_id` string, required
      - `amount` number, required
  - `refundFunds` boolean, required — Whether the received funds should be refunded
  - `refundTarget` 'origin' | 'voucher' | 'customer_balance', required — The method to use for refunding the transaction.

## Response `200`

OK

- POSTTransactionsCreateATransactionCancellation200Response
  - `transactionId` string, required
  - `sellerId` string, required
  - `cancelledItems` object[]
    - `cartItemId` string, required — The ID of the cart to which the item belongs to
    - `type` 'ticket' | 'product' | 'fee' | 'discount' | 'fulfillment' | 'insurance', required — The type of the item indicated where it originated from
    - `name` string, nullable — The name of the item
    - `price` number, float, required — The price of the item
    - `taxRate` number, float — The applied tax rate for that item
    - `origin` union — Object indicating where the item originated from
      - object
        - `fee` object — The cancellation fee of the item
          - `_id` string, required — The ID of the fee component.
          - `amount` number, float — The fee amount.
          - `value` number, float — The fee value.
          - `total` number, float — The fee total. Calculated with amount and value.
          - `type` 'onTicket' | 'onHardTicket' | 'onCart' — The fee type of the fee component.
          - `name` string, nullable — The name of the fee.
          - `publicName` string — The public name of the fee component.
          - `exposed` boolean — Whether this fee will be exposed to the ticket buyer.
          - `scheme` object — The fee scheme of the fee component.
            - `schemeId` string — The ID of the fee scheme.
            - `feeId` string — The ID of the fee scheme fee.
      - object
        - `ticketTypeId` string — The ID of the ticket type this ticket inherits from
      - object
        - `productVariantId` string — The ID of the product variant this product inherits from
    - `cancellationFee` object — The cancellation fee of the item. Is set when cancellation fees are charged at cancellation
      - `_id` string, required — The ID of the fee component.
      - `amount` number, float — The fee amount.
      - `value` number, float — The fee value.
      - `total` number, float — The fee total. Calculated with amount and value.
      - `type` 'onTicket' | 'onHardTicket' | 'onCart' — The fee type of the fee component.
      - `name` string, nullable — The name of the fee.
      - `publicName` string — The public name of the fee component.
      - `exposed` boolean — Whether this fee will be exposed to the ticket buyer.
      - `scheme` object — The fee scheme of the fee component.
        - `schemeId` string — The ID of the fee scheme.
        - `feeId` string — The ID of the fee scheme fee.
    - `refundId` string — The ID of the refund. Is set when item was refunded
    - `cancelledAt` string, date-time — A date indicating when the item has been cancelled
  - `refundId` string
  - `refundTarget` string
  - `refundSource` string
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized

---

[API](https://skmtc.net/vivenu/apis/vivenu-api.md) · [All operations](https://skmtc.net/vivenu/apis/vivenu-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vivenu/vivenu-api/revisions/36be0dca14e7/schema)
