API debug mode
Enable the API debug mode
To use the API debug mode, you have to enable it. You can find this setting in the project settings, and you have to enable it for every project for which you want to use the API debug mode.
Use the API debug mode
If a verification or statistic API request fails or returns a non-successful response, the API will add more data if the API debug mode is enabled. This can help to understand why a request failed.
If the request signature for a request was not successfully verified, the API will return the following response:
Without API debug mode enabled
With API debug mode enabled
Additionally available data
The additional debug data is added to the response in the field
debugInformation. If this field is unavailable in the response, then the API debug mode is either not enabled, or the request was successful. If the verification request was successful, but not all fields could be verified successfully, the debug data is added to the list of issues for every field.
The fields below are set in the response, depending on the type of error:
|Type of error
|Specifies the reason why the request failed (see Reasons).
|Specifies the hash which mosparo calculated.
|Specifies the hash which mosparo received.
|Specifies the data mosparo used to calculate the HMAC hash.
|Specifies if the submit token was set in the request.
|Specifies if the validation signature was set in the request.
|Specifies if the form signature was set in the request.
|Specifies the expected minimum time if the minimum time security feature is enabled.
|Specifies the elapsed time if the minimum time security feature is enabled.
|Specifies the expected validation signature.
|Specifies the received validation signature.
|Specifies the payload used to calculate the expected signature.
|Field verification error
|Specifies the expected value for the field.
|Field verification error
|Specifies the received value for the field.
|The hash for this field was not set in the request.
|The hash for the field calculated by mosparo is different from the hash specified in the request.
|The request signature, an HMAC hash specified as the password in the
Authorization header, was not equal to the expected one.
|The minimum time has not elapsed, and the verification is too early.
|One of the required parameters is missing.
|The given submit token cannot be found in the database.
|The given submit token is invalid, maybe because the submit token was already used.
|The given validation signature is different from the one mosparo has calculated.