Skip to main content
422 Unprocessable Entity means JSON was understood but one or more fields failed validation.

The problem

The response includes a detail array:
{
  "detail": [
    {
      "loc": ["body", "currency"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}
Each item points to a field (loc) and message (msg).

Common fixes

loc / patternFix
body.currencyISO 4217 uppercase, e.g. USD, LRD
body.phoneE.164 digits only, no + (e.g. 231771234567)
body.reference_idUUID v4 — see duplicate reference_id
body.method / body.providerUse MMO prediction or payments by market
body.counterparty_idCreate counterparty first in document-first flows
body.source_type / source_kindUse INVOICE or ORDER — see Checkouts

Solution

1

Log the full detail array

Do not only read HTTP status — every loc entry is a required fix.
2

Compare with API Reference

Open the matching operation under API Reference and align required fields.
3

Re-test with minimal payload

Strip optional fields until the call succeeds, then add fields back.
Last modified on May 22, 2026