Skip to main content
Version: v2alpha1

Responses

HTTP response codes

getpaid API's uses standard HTTP response codes to indicate the success or failure of an API request:

  • 2xx range indicates success.
  • 3xx range indicates a redirection.
  • 4xx range indicates an error caused by the information provided in the call such as missing fields or invalid parameters. The response body can include more details about the error as described in the error responses section.
  • 5xx range indicates an error in the getpaid's servers which is going to happen rarely.

Error responses

Errors in the 4xx range can include more details to help handle the error programmatically or report the error back to the user, such as missing required fields or validation problem (e.g., an email field that doesn't contain a valid email value). The type field is a link that points to the documentation for the error. The response body follows the RFC 7807 - Problem Details for HTTP APIs standard.

404 - Not Found

This error happens when the entity you are requesting does not exist or it has been deleted.

{
"type": "https://docs.getpaid.io/overview/getting-started#404---not-found",
"title": "Not Found",
"status": 404
}

409 - Conflict

When the request cannot be completed due to the current state of the target resource, then the API will return an error with 409.

{
"type": "https://docs.getpaid.io/overview/getting-started#409---conflict",
"title": "Conflict",
"status": 409,
"detail": "Request cannot be completed due to the current state of the server",
}

422 - Invalid Parameters

When a request contains an invalid value the API will return an error with 422 status code and a body as:

{
"type": "https://docs.getpaid.io/overview/getting-started#422---invalid-parameters",
"title": "Invalid Parameters",
"status": 422,
"detail": "The request was invalid",
"errors": {
"field": ["field_invalid"]
}
}

You will need to change the provided values in order to make the request succeed.