API Responses

PayPal API calls return HTTP status codes. Some API calls also return JSON response bodies that include information about the resource.

All responses from FlexShopper share keys:

HTTP status codes

Each REST API request returns a success or error HTTP status code.

Success

All successful request response contains a data object with the full data response.

Response Example
{
  "data": {
    "userId": "1234-asdf-4321-fdsa",
    "decision": {
      "approved": true,
      "spendingLimit": 1300,
    }
  }
}

In the responses, FlexShopper returns these HTTP status codes for successful requests:

Error

In the responses for failed requests, FlexShopper returns HTTP 4XX or 5XX status codes.

For all errors FlexShopper returns an error response body that includes additional error details in this format.

Error Example
{
  "error": {
    "statusCode": 409,
    "code": "UserAlreadyExists",
    "message": "The user could not be created, the user already exists"
    "data": {
      "email": "leonard@email.com"
    }
  }
}

In the responses, FlexShopper returns these HTTP status codes for failed requests:

In addition to common HTTP status codes that the REST APIs return, the API identify logic errors using a unique code click here to learn more

Last updated