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

# Cancel payment

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

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.net/government-digital-service/apis/pay-api.md) · [All operations](https://skmtc.net/government-digital-service/apis/pay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/government-digital-service/pay-api/revisions/9d66a9f54ae4/schema)
