Errors

In this guide, we explain what happens when something goes wrong while interacting with the API. Errors are inevitable — and in most cases, they will be caused by incorrect usage rather than the system itself. Below, you'll find an overview of the status codes and error types you may encounter.

You can determine whether your request was successful by checking the status code in the API response. If the response indicates a failure, use the error type and message to understand what went wrong and diagnose the issue before contacting support.


Status codes

Here is a list of the different categories of status codes returned by the Paypa API. Use these to determine whether a request was successful.

  • Name
    2xx
    Description

    A 2xx status code indicates a successful response.

  • Name
    4xx
    Description

    A 4xx status code indicates a client-side error — meaning the issue originates from your request.

  • Name
    5xx
    Description

    A 5xx status code indicates a server-side error — though these are extremely rare.


Error types

Whenever a request fails, the Paypa API returns an error response containing an error type and message. This information helps you understand what went wrong and how to fix it. Most error messages are clear and actionable.

Below is a list of the error types supported by the Paypa API. Use these descriptions to determine what caused the issue.

  • Name
    error_invalid_sign
    Description
    403 The signature you generated is incorrect. Check your parameters and signature creation function.
  • Name
    error_site_not_found
    Description
    404 No integration was found for the appKey value you provided, or your integration may have been disabled by our system administrators.
  • Name
    not_authorized
    Description
    403 IP whitelist error. Your IP address is not authorized to perform a Withdraw operation.
  • Name
    error_transaction_blacklisted
    Description
    403 The user associated with the transaction has been blacklisted.
  • Name
    error_invalid_bank
    Description
    404 The bankId parameter you provided is invalid.
  • Name
    bankAccount_not_found
    Description
    400 No suitable bank account could be found under the specified bankId for the deposit amount you sent.
  • Name
    internal_server_error
    Description
    500 An unexpected issue occurred and our system administrators have been notified. Please try again later.

Error response

{
    "data": {
        "errMessage": "error_site_not_found"
    },
    "status": 404,
    "responseTime": "5ms",
    "app_version": "paypa-v0.0.1"
}

Was this page helpful?