FlexShopper API
3.0-legacy
FlexShopper API
3.0-legacy
  • Getting Started
  • Our Platforms
    • FlexPay Payment Platform
    • FlexShopper Backend API
  • API Reference
    • Get Started
      • API Requests
      • API Responses
      • Error Codes
    • User Management
      • Create User
      • Get Users
      • Get User
      • Verify User Exists
      • Deeply Verify User Exists
      • Get LoanPaymentPro Child Key
      • Add Payment Method
    • Customer Authentication
      • Request Passcode
      • Login Customer
    • Customer Application
      • Initiate Application
      • Get Verification Questions
      • Verify Answers
      • Validate Routing Number
    • Lease Management
      • Create Lease
      • Get Lease By ID
      • Sign Lease
      • Checkout
    • Purchase Transactions
      • Get Transactions
      • Get Transaction By ID
      • Cancel Items
      • Return Items
      • Confirm Shipment
      • Confirm Receipt
    • Products
      • Get Products
    • Settings
  • Change Log
Powered by GitBook
On this page
  • /v3/transactions/{transactionId}/cancel
  • Response Parameters

Was this helpful?

Export as PDF
  1. API Reference
  2. Purchase Transactions

Cancel Items

Cancel items from a transaction.

/v3/transactions/{transactionId}/cancel

POST https://apis.sandbox.flexshopper.com/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.

PreviousGet Transaction By IDNextReturn Items

Last updated 5 years ago

Was this helpful?