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

Was this helpful?

Export as PDF
  1. Lease

Cancel Items

Cancel items from a transaction.

POST /v3/transactions/:transactionId/cancel

Path Parameters

Name
Type
Description

transactionId

string

The transaction ID provided at lease generation.

Headers

Name
Type
Description

Authorization

string

Authorization token

Request Body

Name
Type
Description

items

array

The list of items to be canceled.

items.sku

string

The SKU to cancel.

items.quantity

string

The quantity to cancel; defaults to the number ordered if not present. For example, if a customer ordered three of an item and wanted to cancel just two, quantity would be set to 2, because leaving it unset would cancel all three of the item.

{
  "data": {
    "leaseId": "\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1YTk...",
    "contract": "...base64 html contract",
    "leaseStatus": "signed"
  }
}
{
  "error": {
    "statusCode": 404,
    "code": "LeaseNotFound",
    "message": "The lease was not found",
    "data": {}
  }
}

Response Parameters

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

Key
Type
Description

canceled

Array

The list of successfully canceled items.

canceled.sku

String

The SKU canceled.

items.quantity

Number

The quantity to canceled.

failed

Array

The list of faled cancels.

failed.sku

String

The SKU that failed to be canceled.

failed.quantity

Number

The quantity of cancels failed for sku.

If the items field is not provided in the request, all items in the transaction will be canceled.

If an item is present in the items array with no quantity, all of that item will be canceled.

PreviousFinalize LeaseNextReturn Items

Last updated 1 month ago

Was this helpful?