FlexShopper API
3.0-legacy
FlexShopper API
3.0-legacy
  • Getting Started
  • Our Platforms
    • FlexPay Payment Platform
    • FlexShopper Backend API
  • API Reference
    • Get Started
      • API Requests
      • API Responses
      • Error Codes
    • User Management
      • Create User
      • Get Users
      • Get User
      • Verify User Exists
      • Deeply Verify User Exists
      • Get LoanPaymentPro Child Key
      • Add Payment Method
    • Customer Authentication
      • Request Passcode
      • Login Customer
    • Customer Application
      • Initiate Application
      • Get Verification Questions
      • Verify Answers
      • Validate Routing Number
    • Lease Management
      • Create Lease
      • Get Lease By ID
      • Sign Lease
      • Checkout
    • Purchase Transactions
      • Get Transactions
      • Get Transaction By ID
      • Cancel Items
      • Return Items
      • Confirm Shipment
      • Confirm Receipt
    • Products
      • Get Products
    • Settings
  • Change Log
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. API Reference
  2. Get Started

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:

Key

Description

data

The full data from a successful request

error.statusCode

HTTP status code. Returned in Response to avoid errors if HTTP codes are intercepted (from a load balancer or firewall, for example).

error.code

Error identifier; only present if the request was an error.

error.message

Full error message; only present if the request was an error.

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:

Status code

Description

200 OK

The request succeeded

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:

Status code

Cause

400 Bad Request

The server could not understand the request. Indicates one of these conditions:

  • The data is not in the expected data format.

  • A required field is not available.

  • A simple data validation error occurred.

401 Unauthorized

The request requires authentication and the caller did not provide valid credentials.

404 Not Found

The server did not find anything that matches the request URI. Either the URI is incorrect or the resource is not available.

500 Internal Server Error

A system or application error occurred. Although the client appears to provide a correct request, something unexpected occurred on the server.

503 Service Unavailable

The server cannot handle the request for a service due to temporary maintenance.

PreviousAPI RequestsNextError Codes

Last updated 6 years ago

Was this helpful?

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