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

# Cancel payment

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

## Request

- Base URL: `https://publicapi.payments.service.gov.uk`
- URL: `https://publicapi.payments.service.gov.uk/v1/payments/{paymentId}/cancel`
- Auth: HTTP bearer

You can use this endpoint [to cancel an unfinished payment](https://docs.payments.service.gov.uk/making_payments/#cancel-a-payment-that-s-in-progress).

## Path parameters

- `paymentId` string, required

## Response `204`

No Content

## Other responses

- `400`: Cancellation of payment failed
- `401`: Your API key is missing or invalid. Read more about [authenticating GOV.UK Pay API requests](https://docs.payments.service.gov.uk/api_reference/#authentication)
- `404`: Not found
- `409`: Conflict
- `429`: Too many requests
- `500`: Downstream system error

---

[API](https://skmtc.dev/government-digital-service/apis/pay-api.md) - [All operations](https://skmtc.dev/government-digital-service/apis/pay-api/llms.txt) - [OpenAPI document](https://skmtc.dev/government-digital-service/apis/pay-api/revisions/9d66a9f54ae4?raw)
