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"
  }
}

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

Last updated