---
title: "Cancel payment"
method: POST
path: "/v1/payments/{paymentId}/cancel"
tags: ["Card payments"]
---

# Cancel payment

`POST /v1/payments/{paymentId}/cancel`

Cancel a payment based on the provided payment ID and the Authorisation token. The Authorisation token needs to be specified in the 'authorization' header as 'authorization: Bearer YOUR_API_KEY_HERE'. A payment can only be cancelled if it's in a state that isn't finished.

## Path parameters

- `paymentId` string, required

## Response `204`

No Content

## Other responses

- `400` — Cancellation of payment failed
- `401` — Credentials are required to access this resource
- `404` — Not found
- `409` — Conflict
- `429` — Too many requests
- `500` — Downstream system error

---

[API](https://skmtc.net/alphagov/apis/gov-uk-pay-api.md) · [All operations](https://skmtc.net/alphagov/apis/gov-uk-pay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alphagov/gov-uk-pay-api/versions/262275a01170/schema)
