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
  • /users/{userId}/passcode-login
  • Response Parameters

Was this helpful?

Export as PDF
  1. API Reference
  2. Customer Authentication

Login Customer

Using the passcode from /users/{userId}/send-passcode, authenticates a user for the system and retrieve a Customer Token.

/users/{userId}/passcode-login

POST https://apis.sandbox.flexshopper.com/v3/users/{userId}/passcode-login

This endpoint allows you to authenticate an user using a passcode.

Path Parameters

Name
Type
Description

userId

string

User's Id

Headers

Name
Type
Description

Authorization

string

Authorization token

Request Body

Name
Type
Description

passcode

string

The customer's passcode generated in the send-passcodeendpoint.

{
  "data": {
    "token": "\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1YTk..."
  }
}
{
  "error": {
    "statusCode": 400,
    "code": "InvalidCredentialsError",
    "message": "Invalid email or passcode",
    "data": {}
  }
}

Response Parameters

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the customer token ready to be used.

Key

Type

Description

token

String

The Customer Token ready to be used; should be set to the Customer-Token header in subsequent API requests.

PreviousRequest PasscodeNextCustomer Application

Last updated 5 years ago

Was this helpful?