Skip to main content
When integrating Payrails API, you can sometimes receive an error response. We make it easy to understand and fix those errors so that our systems can integrate smoothly.

HTTP status codes

Our API replies with different HTTP status codes as the first layer of information on the results of your requests. However, always remember that it is important to dig deeper into the response body to understand the reason for the status code.
HTTP status code 200 can still mean a declined paymentWhen requesting a payment authorization, an HTTP status code 200 doesn’t mean that the payment was successful, but just that the communication with the Payment Provider was done successfully. However, their response could’ve been that the payment was declined, so analyze the response body to find the result.
The following is the list of HTTP status codes that our API can return.

Error structure

All the 4xx errors will specify details about the problem inside the response body. Those errors will have the structure explained in the following table. When returned by our API, these errors look like this:
json
The optional reason section can look like this, for the case of a rejected payment attempt:

List of error codes

The following is a list of the possible values for the code field in Payrails errors, and some advice on how to fix them.

request.malformed

DescriptionThe format or structure of your request does not adhere to the required specifications. It could be due to missing or incorrectly formatted parameters, invalid JSON, or other syntactical errors within the request payload.
ResolutionDouble-check your request payload, parameters, and structure against our API documentation.

request.blocked

DescriptionYour request content was blocked by our content safety policy.
ResolutionReview and revise your request content, then retry.

request.unauthorized

DescriptionYour request lacks the necessary credentials to access the requested resource or perform the specified action.
ResolutionCheck if your headers contain the necessary and valid access token. You can obtain a new one by calling the Access Token API.

request.forbidden

DescriptionYour request is properly authenticated, but your credentials lack the required permissions to perform the requested operation.
ResolutionCheck the roles and permissions of your current credentials.

request.not-found

DescriptionThe requested resource was not found in our system.
ResolutionDouble-check the URL or the resource identifier to ensure its correctness.

request.timeout

DescriptionThe request timed out.
ResolutionYou can retry the request, with the same idempotency key if the endpoint requires one.

request.conflict

DescriptionYour requested operation cannot be completed due to a conflict with the current state of the resource.
ResolutionCheck for specific error details or additional information provided in the error response to understand the nature of the conflict.

request.entity-too-large

DescriptionYour request size exceeds the max limit allowed for the resource.
ResolutionReduce the size of the request you are sending.

request.header.missing

DescriptionYour request is missing a required header.
ResolutionCheck the specific error in the response body to know which parameter is missing.

request.header.invalid

DescriptionYour request contains a header that is not in the required format or its value is not the expected one.
ResolutionCheck the specific error in the response body to know which header is invalid.

request.param.missing

DescriptionYour request is missing a required parameter.
ResolutionCheck the specific error in the response body to know which parameter is missing.

request.param.invalid

DescriptionYour request contains a header that is not in the required format or its value is not the expected one.
ResolutionCheck the specific error in the response body to know which parameter is invalid.

request.method-not-allowed

DescriptionYour request method is not in the required format or its value is not the expected one.
ResolutionRetry the request using the standard method for the operation.

request.canceled

DescriptionThe request was canceled by the client before the server could process it.
ResolutionRetry sending the request in case you want to complete it.

request.rate-limit

DescriptionYou have sent too many requests in a short duration.
ResolutionRetry sending the request after some time.

workflow.action.not-allowed

DescriptionThe action you’re requesting is not allowed for this workflow or for its current state. For example, you cannot execute a Capture action without a successful Authorize action before.
ResolutionCheck your workflow configuration with the Payrails team.

workflow.action.failed

DescriptionThere was a problem during the execution of a Workflow Action.
ResolutionCheck the response body for more specific information about the problem under the reason field. There you will find result from Result Codes, category, source and detail.

workflow.rule.failed

DescriptionThere was a problem during the resolution of a Rule in your Workflow.
ResolutionCheck the response body for more specific information about the problem.

internal

DescriptionSomething wrong happened inside Payrails system.
ResolutionContact Payrails Support Team.

service.unavailable

DescriptionThe request cannot be processed due to unavailability of service, connection outage or timeout.
ResolutionRetry sending the request or contact Payrails Support Team.
Last modified on September 30, 2026