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
  • /v3/leases
  • Response Parameters

Was this helpful?

Export as PDF
  1. API Reference
  2. Lease Management

Create Lease

Creates a new lease with the provided items for the provided customer.

/v3/leases

POST https://apis.sandbox.flexshopper.com/v3/leases

Headers

Name
Type
Description

Customer-Token

string

Customer's authentication token

Authorization

string

Authentication token

Request Body

Name
Type
Description

transactionId

string

A transaction ID to uniquely identify this transaction.

items

array

A list of items to be added to the lease.

items.brand

string

The item's brand.

items.sku

string

The item's SKU (can be vendor-specific).

items.description

string

The item's description.

items.cost

number

The item's cost.

items.quantity

integer

The quantity of this item to add to the lease.

items.mpn

string

The item's Manufacturer Part Number.

items.gtin

string

The item's Global Trade Item Number.

shipping.cost

string

The shipping and handling fee, if any.

shipping.date

string

The shipping date, if any.

{
  "data": {
    "leaseId": "\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1YTk...",
    "contract": "...base64 html contract"
  }
}
{
  "error": {
    "statusCode": 400,
    "code": "InvalidTransactionId",
    "message": "The transaction already exists",
    "data": {}
  }
}

Response Parameters

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the new lease

Key

Type

Description

leaseId

String

Id assigned to the recently created lease agreement

contract

String

Lease contract encoded in base64

A lease's total amount needs to be at least $49.95; otherwise, a LeaseAmountNotSatisfied error code will be returned

If the lease amount is over the customer's spending limit, a ExceedSpendingLimitError error code will be returned

PreviousLease ManagementNextGet Lease By ID

Last updated 3 months ago

Was this helpful?