GOV.UK Pay · Schema

RequestError

A Request Error response

PaymentsGovernmentUKPublic SectorRESTPCI DSSRefundsRecurring PaymentsWebhooks

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"
    }
  }
}