---
title: "Cancel a scheduled retry"
method: POST
path: "/payments/{id}/cancellations"
tags: ["Payments"]
---

# Cancel a scheduled retry

`POST /payments/{id}/cancellations`

## Request

- Base URL: `https://{prefix}.api.sandbox.checkout.com`
- URL: `https://{prefix}.api.sandbox.checkout.com/payments/{id}/cancellations`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `string` scopes: `gateway`, `gateway:payment-cancellations`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/checkout/apis/checkout-com-api-reference/docs/payments/:id/cancellations/post.ts> (a function with typed inputs; its response is checked against the schema)

Cancels an upcoming retry, if there is one scheduled

Cancellation requests are processed asynchronously. You can use [workflows](#tag/Workflows) to be notified if the cancellation is successful.

## Path parameters

- `id` string, required

## Headers

- `Cko-Idempotency-Key` string

## Request body

- CancellationRequest
  - `reference` string: A reference you can later use to identify this cancellation request. You can use this value to identify the cancellation request later.

## Response `202`

Cancellation accepted

- CancellationAcceptedResponse: Cancellation response
  - `action_id` string, required: The action identifier
  - `reference` string: Your reference for the cancellation request.
  - `_links` object: The links related to the cancellation.
    - `payment` Link, required
      - `href` string, required: The link URL

## Other responses

- `401`: Unauthorized
- `403`: Cancellation not allowed
- `404`: Payment not found
- `422`: Invalid data sent
- `429`: Too Many Requests
- `502`: Bad gateway

---

[API](https://skmtc.dev/checkout/apis/checkout-com-api-reference.md) - [All operations](https://skmtc.dev/checkout/apis/checkout-com-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/checkout/apis/checkout-com-api-reference/revisions/0f1abdb1c3e9?raw)
