FlexShopper API
3.0-beta
FlexShopper API
3.0-beta
  • Integration Guides
    • Medusa
    • Payment Plugin
  • Customer
    • Verify User Exists
    • Deeply Verify User Exists
    • Create User
    • Get Users
    • Get User
    • Create Authorization Token
    • Add Payment Method
      • Get LoanPaymentPro Child Key
      • Get Clover PKMS Key
  • Decision
    • Apply for Spending Limit
  • Lease
    • Create Lease
    • Get Transactions
    • Get Lease By ID
    • Get Transaction By ID
    • Sign Lease
    • Finalize Lease
    • Cancel Items
    • Return Items
    • Confirm Shipment
    • Confirm Receipt
  • Page 1
Powered by GitBook
On this page
  • Request
  • Headers
  • Request Body
  • Response
  • Samples
  • Schema

Was this helpful?

Export as PDF
  1. Lease

Create Lease

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

POST /v3/leases

Request

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.

totalDiscount

number

The total discount amount to be applied to the lease.

Response

Samples

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

Schema

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

PreviousLeaseNextGet Transactions

Last updated 1 month ago

Was this helpful?