---
title: "Cancel merchant transaction"
method: POST
path: "/v1/marketplaces/{marketplaceId}/merchants/{merchantId}/transactions/cancel"
tags: ["Merchant transactions"]
---

# Cancel merchant transaction

`POST /v1/marketplaces/{marketplaceId}/merchants/{merchantId}/transactions/cancel`

## Request

- Base URL: `https://sandbox.pismolabs.io/sellers`
- URL: `https://sandbox.pismolabs.io/sellers/v1/marketplaces/{marketplaceId}/merchants/{merchantId}/transactions/cancel`
- Auth: HTTP bearer

Cancel a previously created merchant transaction.

This endpoint allows for the creation of cancellation transactions that reverse the financial impact of original sale transactions.
Cancellation transactions maintain negative amounts of all financial values (amount, MDR, fees) and reference the original transaction via origin_merchant_transaction_id.

When the original transaction was split, the cancellation status is automatically set to `WAITING_SPLIT`, otherwise it follows the default status (`SCHEDULED`).

This endpoint generates a [Merchant transaction created](https://developers.pismo.io/events/docs/merchants-merchant-transaction-created-1) event.

## Path parameters

- `marketplaceId` integer, required
- `merchantId` integer, required

## Headers

- `Authorization` string, required

## Request body

- MerchantTransactionCancelPostRequest
  - `event_date` string, datetime, required: Event datetime. The datetime format follows the ISO 8601 format (UTC).
  - `amount` number, float, required: Merchant transaction amount
  - `authorization` MerchantTransactionAuthorizationRequest, required
    - `id` integer, required: Authorization identifier
    - `parent_id` integer, required: Parent authorization identifier from the original transaction
  - `processing_code` string, required: Processing code.<br> For more information, refer to [Processing codes](doc:processing-codes-and-transaction-types).

## Response `201`

Successfully list merchant transactions

- MerchantTransactionsResponseList
  - `items` MerchantTransactionResponse[]
    - `id` integer: Merchant transaction identifier
    - `merchant_id` integer: Merchant ID
    - `creditor_id` integer, nullable: Creditor identifier
    - `authorization_id` number, nullable: Authorization identifier
    - `parent_authorization_id` number, nullable: Parent authorization identifier
    - `org_operation_id` number, nullable: Org operation identifier
    - `amount` number, float: Merchant transaction amount
    - `mdr_amount` number, float: Merchant transaction MDR amount
    - `mdr_without_fee` number, float: Merchant transaction MDR amount without fee
    - `mdr_tax` number, float: Merchant transaction MDR amount of marketplace
    - `fee` number, float: Merchant transaction fee
    - `installment` integer: Current instalment
    - `number_of_installments` integer: Number of installments
    - `event_date` string, datetime: Event datetime. The datetime format follows the ISO 8601 format (UTC).
    - `scheduled_payment_date` string, datetime: The scheduled payment date for the transaction. The datetime format follows the ISO 8601 format (UTC).
    - `status` string: Merchant transaction status
    - `advanced_amount` integer: Merchant transaction identifier
    - `type` string: Merchant transaction type
    - `origin_merchant_transaction_id` integer, nullable: Sale Merchant transaction identifier
    - `advancement_request_id` integer, nullable: Advancement Requested id
    - `marketplace_id` integer: Marketplace ID
    - `currency_code` string: ISO-4217 alphabetic (3 characters) currency code
    - `discount_amount` number, float: Total discount amount applied to the transaction
    - `discount_details` DiscountDetail[]
      - `name` string: Discount name
      - `amount` number, float: Total discount amount

## Other responses

- `400`: Bad request
- `500`: Internal server error

---

[API](https://skmtc.dev/pismo/apis/seller-management-transactions.md) - [All operations](https://skmtc.dev/pismo/apis/seller-management-transactions/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/seller-management-transactions/revisions/95ba885d7f40?raw)
