# GOV.UK Pay API API

> GOV.UK Pay API (This version is no longer maintained. See openapi/publicapi_spec.json for latest API specification)

GOV.UK Pay API is a finance API from payments.service.gov.uk. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 10 endpoints.

## At a glance

- Category: [Finance](https://www.openparable.com/apis/category/finance)
- Provider: payments.service.gov.uk
- Authentication: API key
- HTTPS: Yes
- CORS: Not stated
- Base URL: https://publicapi.payments.service.gov.uk
- Documentation: https://payments.service.gov.uk/
- OpenAPI description: https://api.apis.guru/v2/specs/payments.service.gov.uk/payments/1.0.3/swagger.json
- Version: 1.0.3
- Specification updated: 2023-03-06

## Example request

```bash
curl -X GET "https://publicapi.payments.service.gov.uk/v1/payments" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
```

## Endpoints

- `GET /v1/payments` — Search payments
- `POST /v1/payments` — Create new payment
- `GET /v1/payments/{paymentId}` — Find payment by ID
- `POST /v1/payments/{paymentId}/cancel` — Cancel payment
- `POST /v1/payments/{paymentId}/capture` — Capture payment
- `GET /v1/payments/{paymentId}/events` — Return payment events by ID
- `GET /v1/payments/{paymentId}/refunds` — Get all refunds for a payment
- `POST /v1/payments/{paymentId}/refunds` — Submit a refund for a payment
- `GET /v1/payments/{paymentId}/refunds/{refundId}` — Find payment refund by ID
- `GET /v1/refunds` — Search refunds

## Questions

### Does the GOV.UK Pay API API need an API key?

Yes. The GOV.UK Pay API API uses API key authentication; the documentation explains how to get credentials.

### Does the GOV.UK Pay API API support HTTPS?

Yes, the GOV.UK Pay API API is served over HTTPS.

### How many endpoints does the GOV.UK Pay API API have?

Its OpenAPI description lists 10 endpoints in version 1.0.3. All of them are shown on this page.

### What are alternatives to the GOV.UK Pay API API?

Other Finance APIs include Stripe, SEC EDGAR Data, Plaid, Fed Treasury, Razorpay IFSC.

## Similar finance APIs

- [Stripe](https://www.openparable.com/apis/stripe): Payment processing, subscriptions, and financial management
- [SEC EDGAR Data](https://www.openparable.com/apis/sec-edgar-data): API to access annual reports of public US companies
- [Plaid](https://www.openparable.com/apis/plaid): Connect with user's bank accounts and access transaction data
- [Fed Treasury](https://www.openparable.com/apis/fed-treasury): U.S. Department of the Treasury Data
- [Razorpay IFSC](https://www.openparable.com/apis/razorpay-ifsc): Indian Financial Systems Code (Bank Branch Codes)
- [Klarna](https://www.openparable.com/apis/klarna): Klarna payment and shopping service
- [Citi](https://www.openparable.com/apis/citi): All Citigroup account and statement data APIs
- [Zoho Books](https://www.openparable.com/apis/zoho-books): Online accounting software, built for your business
- [FRED](https://www.openparable.com/apis/fred): Economic data from the Federal Reserve Bank of St. Louis
- [Polygon](https://www.openparable.com/apis/polygon): Historical stock market data
- [MercadoPago](https://www.openparable.com/apis/mercadopago): Mercado Pago API reference - all the information you need to develop your integrations
- [Open Banking - Payments initiation service](https://www.openparable.com/apis/open-banking-payments-initiation-service): Open Banking - Payments initiation service

Listed from: APIs.guru (CC0). Check the provider's terms before use.

---

Source: https://www.openparable.com/apis/gov-uk-pay (OpenParable). Cite the canonical URL above.
