Response

Parent Previous Next


Property


Explanation

Type

Example

Success


True if the operation completed successfully otherwise false.

Boolean

true

Message


Zero, one or more string messages.

If the operation failed, the reasons will usually be stated here.

String

Bad Request - Invalid Payer Reference

ValidationMessages

zero , one or more validation messages that resulted from the API validating the incoming payer request object.


Array of strings

A payer with the requested reference already exists for the requested group.



Examples:


Example of a payer being successfully created


{

   "Success": true,

   "Message": "Payer created successfully",

   "ValidationMessages": []

}





Here is an example in JSON format of a payer creation request that failed:


{

   "Success": false,

   "Message": "Bad Request - Invalid Payer Reference.",

   "ValidationMessages": [

       "A payer with the requested reference already exists for the requested group."

   ]

}



The overall result (Success) is false which shows the payer did not get created.


Message gives the general HTTP response - sometimes (as in this case) with some extra contextual information.

ValidationMessages contains an array of validation messages that in the order that the APi encountered them.  In this case we can clearly see that the payer did not get created because a payer reference is already in use for the DDMS group.  This would violate Direct Debit scheme rules.