Validation errors
When you make a payment using POST /payment-request, the API validates the request body before processing. If the request contains errors such as missing required fields or invalid data formats, the API will return a 4xx status code along with detailed error information in the response body.
The API checks all required fields in nested objects such as
Recipient.Account.AccountNumber. If any part is missing or invalid, the request will fail with detailed validation messages.
You must fix the errors and resubmit the request.
Typical validation error structure
{
"errors": [
{
"field": "ExampleField1",
"message": "Example error message1"
},
{
"field": "ExampleField2",
"message": "Example error message2"
}
]
}Common validation errors and how to fix them
| Error Message | Cause | How to Fix |
|---|---|---|
"The field field is required." | A required field is missing. | Add the missing field to the request. |
"The field field must be a valid ISO 4217 currency code." | An invalid currency code was used. | Use a standard 3-letter currency code, for example GBP, USD, EUR. |
"The field Email is not a valid e-mail address." | The email format is incorrect. | Check for typos or formatting issues. |
"The field Name must be a string with a maximum length of 250." | The input exceeds the character limit. | Shorten the string to meet the maximum length. |
"The field AccountNumber can only contain numeric characters." | Letters or symbols were used in a number field. | Remove non-numeric characters. |
"The value provided for ExternalReference2 is not allowed." | A denylisted value was used. | Choose a different value or contact support. |
"SendAccountId is not permitted for this user." | The account ID doesn’t belong to the user. | Use an ID returned by GET /accounts. |
"Either StoredRecipientId or ExternalStoredRecipientId must be provided." | No recipient ID was included. | Include one of the two identifiers. |
"SendValue must be greater than 0." | A negative amount was entered. | Use a positive number for the amount. |
Use the Rules section in MAS under Money Out > Rules to determine country-specific field requirements.
Some fields (like ABA code for USD to US) are required only for specific currencies and recipient countries.
Updated 17 days ago