Error Response Format

Successful API response return either HTTP status code 200 OK or 204 No Content. All other responses can be considered errors. Some errors have response bodies, others do not:

Errors without Response Bodies

HTTP Status CodeDescription
404 Not FoundThe requested resource was not found. This could mean that the route requested (URL) does not exist OR that an id in the request does not exist in the PaySimple system.
401 UnauthorizedThe authorization header is invalid. Check the API key.
405 Method Not AllowedThe requested method/verb (e.g. GET/PUT/POST/DELETE) is not supported for the route specified.

Errors with Response Bodies

Error TypeHTTP Status CodeDescription
validation400 Bad RequestInvalid request input. If a property has failed a validation check, the property_name field will be populated.
system500 Internal Server ErrorSystem Error. Check for coding errors and then try again. If the error persists, send the reference code to PaySimple API Support for assistance.
authorization403 ForbiddenThe API key provided does not have permission to access the requested resource. If you feel this is in error, contact support.

Example Response Bodies

[
    {
        "message": "Amount must be greater than $0.00.",
        "property_name": "amount",
        "error_type": "validation"
    },
    {
        "message": "'expiration_month' must be between 1 and 12. You entered 0.",
        "property_name": "key_entered_card.expiration_month",
        "error_type": "validation"
    }
]
[
	{
		"message": "A system error has occurred, please contact customer support and reference code '8D6D8B723D6DBCB'.",
		"error_type": "system"
	}
]
[
	{
		"message": "User is unauthorized to access resource.",
		"error_type": "authorization"
	}
]

🚧

Logging Errors

Creating a log to capture any API errors is strongly recommended. It will be extremely helpful when you work with our API Support Team to troubleshoot errors. Be sure to log the exact timestamp of when the error occurred, the full error message and any available ids (merchant id, transaction id, etc) for error context. When sending log output to the PaySimple team, be sure to mention what time zone your log messages are in.