---
title: "Cancel earmark (Pismo account ID)"
method: POST
path: "/cash-management/v2/earmarks/{earmarkId}/cancel"
tags: ["Earmarking (Pismo account ID)"]
---

# Cancel earmark (Pismo account ID)

`POST /cash-management/v2/earmarks/{earmarkId}/cancel`

Cancel a previously set earmark, releasing the earmarked funds, and preventing the earmark from executing at its scheduled expiration date/time.
For more information about earmark operations, refer to the [Earmarks launch reference](https://developers.pismo.io/pismo-docs/docs/earmarks) guide.

This endpoint generates the follow events:
- [Platform authorization created](https://developers.pismo.io/events/docs/platform-authorization-platform-authorization-1)
- [Account balance changed](https://developers.pismo.io/events/docs/account-balances-balance-change-1)
- [Account balance changed (Availables)](https://developers.pismo.io/events/docs/availables-change-available-1)
- [Transaction created](https://developers.pismo.io/events/docs/transaction-creation-1)
- [Earmark created, updated, or canceled](https://developers.pismo.io/events/docs/corporate-earmark-1) with `CANCELED` Action.

See [Data and reporting](https://developers.pismo.io/pismo-docs/docs/data-reporting-overview) for more information about events and setting up event notifications.

**NOTE**: This endpoint requires an account token - an access token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a `401 Unauthorized` message.

## Path parameters

- `earmarkId` string, required

## Request body

- CancelEarmarkRequest
  - `internal_operation` InternalOperation2, required — Data used in transactions executed internally during the request.
    - `tracking_id` string, required — Customer created tracking ID. Must consist of alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), and colons (:), with a length from 1 to 128. The Pismo platform uses this field to implement idempotency and prevent duplicates.
    - `business_date` string, date — Specifying a `business_date` value impacts the account balance history.<br> <b>Notes</b>: - The business date is in ISO 8601 format. - The business date allows users to designate the balance history cycle in which a payment is posted. - You can specify a `business_date` within the current working day or up to one working day before or after.
    - `validation_rules` ValidationRules — Rules that determine which validations are executed during the payment process.<br> Available validation rules: - `LEDGER` - `ACCOUNT_STATUS` - `FLEX_CONTROLS` - `RATES`<br> `force` is only supported for `LEDGER`. `override` is supported for `ACCOUNT_STATUS`, `FLEX_CONTROLS`, and `RATES`.
    - `metadata` CancelEarmarkMetadata — Key-value pairs containing data intended for storage in the Pismo system.<br> **Note**: This field must not be used to send Personally Identifiable Information (PII), Payment Card Industry (PCI) data, or any sensitive/regulated information. Metadata fields are intended for operational, non-sensitive data only. For sensitive data, use the specific parameters designed for that purpose. For more information, refer to [Get started with Pismo APIs](https://developers.pismo.io/pismo-docs/reference/get-started-with-pismo-apis).

## Response `200`

OK

- EarmarkResponse
  - `earmark_id` string — Earmark ID. Used as the primary key for query and update operations. It has the same value as the tracking ID, if one is provided. Generated by [Create Earmark](https://developers.pismo.io/pismo-docs/reference/post-corporate-v2-earmarks).
  - `account_id` integer — Account ID generated by [Create Corporate Account](https://developers.pismo.io/pismo-docs/reference/post-account).<br> `minimum: 1` `maximum: 4294967295`
  - `external_account_id` string — External ID of the account on which the earmark is created. Should be the same `external_account_id` that was used to log in. Should be the same `external_account_id` used in [Create Corporate Account](https://developers.pismo.io/pismo-docs/reference/post-account).
  - `description` string — Earmark description
  - `amount` number, float — Earmark amount<br> `minimum: 0.01` `maximum: 18446744073709551617`
  - `balance` number — Earmark balance. Initially equal to the earmarked amount and decreases as the reserved funds are used up or decreased in a decrease operation. It can also increase if an increase operation is performed.<br> `minimum: 0` `maximum: 18446744073709551617`
  - `release_datetime` string, date-time — RFC 3339 date/time for earmark release. Used to schedule a cash-out (usually a payment) at the specified release date and time. At `release_datetime`, an automatic process releases the earmarked funds and settles the cash-out. If no `release_datetime` is set, the earmarked amount is held indefinitely until the customer cancels the earmark.
  - `internal_operations` InternalOperation[] — List of internal operations performed to hold or release the earmark funds.
    - `tracking_id` string, required — Customer created tracking ID. Must consist of alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), and colons (:), with a length from 1 to 128. The Pismo platform uses this field to implement idempotency and prevent duplicates.
    - `business_date` string, date — Specifying a `business_date` value impacts the account balance history.<br> <b>Notes</b>: - The business date is in ISO 8601 format. - The business date allows users to designate the balance history cycle in which a payment is posted. - You can specify a `business_date` within the current working day or up to one working day before or after.
    - `type` 'HOLD_FUNDS' | 'RELEASE_FUNDS' | 'INCREASE' | 'DECREASE' — Internal operation type.<br> `minLength: 1` `maxLength: 13`
    - `processing_code` string — Processing code for the debit transaction. If `split_transaction` is `false` (the default), each installment payment is recorded as one debit transaction equal to the installment amount minus the discount, and `processing_code` is the processing code for that transaction. If `split_transaction` is `true`, each installment payment is recorded as two transactions: a debit transaction for the installment amount and a credit transaction for the discount. In this case, `processing_code` is the processsing code for the debit transaction, and `second_processing_code` is the processing code for the credit transaction.
    - `amount` number — Internal operation amount<br> `minimum: 0` `maximum: 18446744073709551617`
    - `validation_rules` ValidationRules — Rules that determine which validations are executed during the payment process.<br> Available validation rules: - `LEDGER` - `ACCOUNT_STATUS` - `FLEX_CONTROLS` - `RATES`<br> `force` is only supported for `LEDGER`. `override` is supported for `ACCOUNT_STATUS`, `FLEX_CONTROLS`, and `RATES`.
    - `created_at` string, datetime — Internal operation creation time. Format = yyyy-mm-dd:hr:mm:ss.
    - `metadata` InternalOperationMetadata — Key-value pairs containing data intended for storage in the Pismo system.<br> **Note**: This field must not be used to send Personally Identifiable Information (PII), Payment Card Industry (PCI) data, or any sensitive/regulated information. Metadata fields are intended for operational, non-sensitive data only. For sensitive data, use the specific parameters designed for that purpose. For more information, refer to [Get started with Pismo APIs](https://developers.pismo.io/pismo-docs/reference/get-started-with-pismo-apis).

## Other responses

- `400` — Bad request
- `401` — Unauthorized operation.
- `404` — Not Found
- `409` — Conflict
- `500` — Internal server error

---

[API](https://skmtc.net/pismo/apis/platform-authentication.md) · [All operations](https://skmtc.net/pismo/apis/platform-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pismo/platform-authentication/revisions/935b62e16de4/schema)
