Create Lease

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

POST /v3/leases

Request

The details below help you form your HTTP requests to this endpoint.

Headers

You may need to provide specific headers.

Name
Type
Required
Description

customer-token

string

Customer's authentication token

x-version-override

string

N/A

x-consumer-custom-id

string

Consumer data with the format "channel:vendorId"

Query

You may provide query parameters to filter the output.

Name
Type
Required
Description

asPdf

boolean

Flag to determine if contract will be in PDF format

sendLink

boolean

Flag to determine if a link will be sent

withToken

boolean

Flag to determine if an agreement token will be returned

Body

You must provide a JSON payload.

Name
Type
Required
Description

transactionId

string

A transaction ID to uniquely identify this transaction

orderId

string

The reference to the external order ID

items

array

N/A

items[].brand

string

The item's brand.

items[].sku

string

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

items[].productId

string

Product Id

items[].description

string

The item's description

items[].cost

number

The item's cost.

items[].condition

string

The item's condition

items[].quantity

number

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

object

N/A

shipping.cost

number

The shipping and handling fee, if any.

shipping.date

string

The shipping date, if any.

shipping.method

string

The shipping method

shipping.store

any

N/A

payTomorrowTaxTotal

number

The total tax amount send over by PayTomorrow

totalDiscount

number

The total discount amount to be applied proportionally across items

Response

The details below help you understand the responses you could get from this endpoint.

Samples

Below are samples of responses, with tabs corresponding to returned status code.

{
    "data": {
        "leaseId": "\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1YTk...",
        "contract": "...base64 html contract",
        "frequency": "weekly",
        "term": 52,
        "payment": 17.28,
        "cashPrice": 400,
        "costOfRental": 440,
        "payTomorrowTaxTotal": 12.34
    }
}

Schema

The response's schema is outlined below.

Name
Type
Required
Description

data

object

N/A

data.leaseId

string

A unique identifier for the generated lease

data.contract

string

The lease contract, expressed as base64-encoded HTML

data.frequency

string

Frequency of lease payments

data.term

number

Term of the lease

data.payment

number

Periodic payment with tax

data.cashPrice

number

Cash price of the lease

data.costOfRental

number

Cost of the lease

data.payTomorrowTaxTotal

number

The total tax amount send over by PayTomorrow

Last updated

Was this helpful?