Payments Docs
Error codes

Errors / The request is not valid

The request is not valid

Code
validation_failed
HTTP status
422
Where you see it
An error answer (application/problem+json)

How to fix it

Tip

Fix the fields listed in "errors" and send the request again.

What the answer looks like

Every error is application/problem+json (RFC 9457). Read the code, not the title or detail text, which may change. Keep the request_id when you contact support. The detail says which case it is; there are 7:

A deposit is created without an amount.

Error 422 (JSON)
{
  "type": "https://docs.no1paytest.com/errors/validation_failed",
  "status": 422,
  "code": "validation_failed",
  "title": "The request is not valid",
  "detail": "Fix the fields listed in \"errors\" and send the request again.",
  "errors": {
    "amount": [
      "Fill in amount."
    ]
  },
  "request_id": "req_01k6c0z7x4m2p9q8r5s3t1v0w2"
}

A withdrawal is created with a test key and a card number that is not one of the test cards of the guide (Test data).

Error 422 (JSON)
{
  "type": "https://docs.no1paytest.com/errors/validation_failed",
  "status": 422,
  "code": "validation_failed",
  "title": "The request is not valid",
  "detail": "Fix the fields listed in \"errors\" and send the request again.",
  "errors": {
    "destination.card_number": [
      "A test key takes only the test cards of the guide (Test data) in destination.card_number."
    ]
  },
  "request_id": "req_01k6c0z7x4m2p9q8r5s3t1v0w2"
}

A withdrawal is created with a test key and a Sheba that is not one of the test Shebas of the guide (Test data).

Error 422 (JSON)
{
  "type": "https://docs.no1paytest.com/errors/validation_failed",
  "status": 422,
  "code": "validation_failed",
  "title": "The request is not valid",
  "detail": "Fix the fields listed in \"errors\" and send the request again.",
  "errors": {
    "destination.sheba": [
      "A test key takes only the test Shebas of the guide (Test data) in destination.sheba."
    ]
  },
  "request_id": "req_01k6c0z7x4m2p9q8r5s3t1v0w2"
}

A withdrawal is created with a live key and a test card.

Error 422 (JSON)
{
  "type": "https://docs.no1paytest.com/errors/validation_failed",
  "status": 422,
  "code": "validation_failed",
  "title": "The request is not valid",
  "detail": "Fix the fields listed in \"errors\" and send the request again.",
  "errors": {
    "destination.card_number": [
      "destination.card_number is a test card: it works only with a test key."
    ]
  },
  "request_id": "req_01k6c0z7x4m2p9q8r5s3t1v0w2"
}

A withdrawal is created with a live key and a test Sheba.

Error 422 (JSON)
{
  "type": "https://docs.no1paytest.com/errors/validation_failed",
  "status": 422,
  "code": "validation_failed",
  "title": "The request is not valid",
  "detail": "Fix the fields listed in \"errors\" and send the request again.",
  "errors": {
    "destination.sheba": [
      "destination.sheba is a test Sheba: it works only with a test key."
    ]
  },
  "request_id": "req_01k6c0z7x4m2p9q8r5s3t1v0w2"
}

The sample withdrawal (its test card and test Sheba) is created with a live key.

Error 422 (JSON)
{
  "type": "https://docs.no1paytest.com/errors/validation_failed",
  "status": 422,
  "code": "validation_failed",
  "title": "The request is not valid",
  "detail": "Fix the fields listed in \"errors\" and send the request again.",
  "errors": {
    "destination.card_number": [
      "destination.card_number is a test card: it works only with a test key."
    ],
    "destination.sheba": [
      "destination.sheba is a test Sheba: it works only with a test key."
    ]
  },
  "request_id": "req_01k6c0z7x4m2p9q8r5s3t1v0w2"
}

A withdrawal is created with a test key and a destination.account_number (test data has no bank account numbers).

Error 422 (JSON)
{
  "type": "https://docs.no1paytest.com/errors/validation_failed",
  "status": 422,
  "code": "validation_failed",
  "title": "The request is not valid",
  "detail": "Fix the fields listed in \"errors\" and send the request again.",
  "errors": {
    "destination.account_number": [
      "A test key takes no destination.account_number: leave it out (test data has no bank account numbers)."
    ]
  },
  "request_id": "req_01k6c0z7x4m2p9q8r5s3t1v0w2"
}

Learn more