GOV.UK Pay · Schema

RequestError

A Request Error response

PaymentsGovernmentUKPublic SectorRESTPCI DSSRefundsRecurring PaymentsWebhook

Properties

Name Type Description
code string An [API error code](https://docs.payments.service.gov.uk/api_reference/#gov-uk-pay-api-error-codes)that explains why the payment failed.

`code` only appears if the payment failed.
description string Additional details about the error.
field string The parameter in your request that's causing the error.
header string The header in your request that's causing the error.
View JSON Schema on GitHub

JSON Schema

RequestError.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://github.com/api-evangelist/gov-uk-pay/blob/main/json-schema/RequestError.json",
  "title": "RequestError",
  "type": "object",
  "description": "A Request Error response",
  "properties": {
    "code": {
      "type": "string",
      "description": "An [API error code](https://docs.payments.service.gov.uk/api_reference/#gov-uk-pay-api-error-codes)that explains why the payment failed.<br><br>`code` only appears if the payment failed.",
      "example": "P0102"
    },
    "description": {
      "type": "string",
      "description": "Additional details about the error.",
      "example": "Invalid attribute value: amount. Must be less than or equal to 10000000"
    },
    "field": {
      "type": "string",
      "description": "The parameter in your request that's causing the error.",
      "example": "amount"
    },
    "header": {
      "type": "string",
      "description": "The header in your request that's causing the error.",
      "example": "Idempotency-Key"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/RequestError"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.