FlexShopper API
3.0-beta
FlexShopper API
3.0-beta
  • Introduction
  • 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
    • Get Payment Methods
  • 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
    • Get Agreements
    • Collect Payment
Powered by GitBook
On this page
  • Request
  • Headers
  • Path Parameters
  • Body
  • Response
  • Samples
  • Schema

Was this helpful?

Export as PDF
  1. Lease

Cancel Items

Cancels an item from a lease

POST /v3/transactions/{transactionId}/cancel

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

x-consumer-custom-id

string

Consumer data with the format "channel:vendorId"

Path Parameters

The endpoint path expects parameters.

Name
Type
Required
Description

transactionId

string

The transaction ID provided at lease generation.

Body

You must provide a JSON payload.

Name
Type
Required
Description

items

array

The list of items to be cancelled.

items[].sku

string

Item's sku

items[].quantity

number

Quantity, defaults to the number ordered if not present.

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": {
        "canceled": [
            {
                "sku": "123ASD",
                "quantity": 1
            }
        ],
        "failed": [
            {
                "sku": "123ASD",
                "quantity": 1
            }
        ]
    }
}
{
    "error": {
        "statusCode": 400,
        "code": "UserAlreadyExists",
        "message": "User already exists with email ex@example.com",
        "data": {}
    }
}

Schema

The response's schema is outlined below.

Name
Type
Required
Description

data

object

N/A

data.canceled

array

N/A

data.canceled[].sku

string

The Item's SKU canceled

data.canceled[].quantity

number

The quantity of items canceled

data.failed

array

N/A

data.failed[].sku

string

The Item's SKU failed to cancel

data.failed[].quantity

number

The quantity of items failed

PreviousFinalize LeaseNextReturn Items

Last updated 1 day ago

Was this helpful?