Carts

Show Cart

Shows the cart indicated by the provided cart_id. This API is only available to merchants using the Partially Hosted Ecommerce Experience.

The Show Cart operation can be called at any time by a merchant to view the current state of the cart. Merchant can obtain the current cart_id by calling the Show MerchantCustomer API. Customers can only have 1 cart active at a time. Once the cart is checked out, the customer receives a new empty Cart with a new cart_id.

Cart States

The cart state will change as the customer adds and removes items from the cart and performs other options on the LiftForward site. Below are a few examples of typical cart states:

Empty Cart

Below is a typical empty cart.

  • can_checkout is false because this customer has not met the requirements to checkout.
  • is_compliant is false because this program requires at least 1 hero product in the cart.
  • compliance_errors contains an error indicating that a hero product is missing.
  • status is draft because the cart has not been checked out yet.
  • All 3 item arrays are empty.
  • The cart totals are all $0.00.
{
  "cart": {
    "cart_id": "mcgzsesbntzw4r9dyq5gs3eex2w",
    "merchant_customer_id": "6b1bf54b-c92d-494a-9a19-4e9a8a9879ae",
    "merchant": {
      "source_channel_id": "ONLINE_SHIP_TO_HOME",
      "store_id": null,
      "employee_id": null
    },
    "country_code": "US",
    "created_at": "2024-03-27T20:27:39Z",
    "currency": "USD",
    "total_sale_price": 0.0,
    "total_price": 0.0,
    "total_sales_tax": 0.0,
    "total_installment_payment": 0.0,
    "status": "draft",
    "can_checkout": false,
    "is_compliant": true,
    "compliance_errors": [
      {
        "key": "hero_product_missing"
      }
    ],
    "rental_items": [],
    "finance_items": [],
    "service_items": []
  }
}

Cart with Items

Below is a typical cart once the user has added some items.

  • can_checkout is false because this customer has not met the requirements to checkout.
  • is_compliant is false because this customer has not yet accepted an application with the lender.
  • compliance_errors contains an error indicating that there is no accepted credit application.
  • status is draft because the cart has not been checked out yet.
  • the rental_items and finance_items have cart items added by the customer.
  • The cart totals reflect the sum of the cart items.
{
  "cart": {
    "cart_id": "mcgzsesbntzw4r9dyq5gs3eex2w",
    "merchant_customer_id": "6b1bf54b-c92d-494a-9a19-4e9a8a9879ae",
    "merchant": {
      "source_channel_id": "ONLINE_SHIP_TO_HOME",
      "store_id": null,
      "employee_id": null
    },
    "country_code": "US",
    "created_at": "2024-03-27T20:27:39Z",
    "currency": "USD",
    "total_sale_price": 1139.0,
    "total_price": 1139.0,
    "total_sales_tax": 0.0,
    "total_installment_payment": 31.64,
    "status": "draft",
    "can_checkout": false,
    "is_compliant": false,
    "compliance_errors": [
      {
        "key": "application_not_accepted"
      }
    ],
    "rental_items": [
      {
        "cart_item_id": "dqqpzs2y4kbw42a6y8a3dmd2sfg",
        "product_id": "tablet_model_abc_rent",
        "product_name": "Tablet Model ABC",
        "merchant_sku": "1239diw80d9ckb",
        "unit_retail_price": 1079.0,
        "unit_sale_price": 1079.0,
        "residual_value": 0.0,
        "total_over_term":  1079.0,
        "total_payment_to_buy_out": 1079.0,
        "total_payment_to_trade_in": 1079.0,
        "unit_installment_payment": 29.98,
        "installment_service_fee": 0.0,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": null,
        "contract_type": "RENT",
        "linked_service_item_ids": [],
        "subscription_plan": {
          "subscription_plan_id": "standard-plan",
          "plan_code": "standard",
          "plan_name": "Standard Plan",
          "plan_subtitle": "This is the basic plan.",
          "plan_summary": "Total financed amount when you upgrade is $1,079 and includes 36 months of payments. T&Cs, fees, charges & exclusions apply."
        }
      }
    ],
    "finance_items": [
      {
        "cart_item_id": "8rw46qspxx824jarx6h4h7sg4ya",
        "product_id": "tablet_headphones_v3_red",
        "product_name": "Tablet Headphones V3 - Red",
        "merchant_sku": "994kjbjslekff3",
        "unit_retail_price": 60.0,
        "unit_sale_price": 60.0,
        "residual_value": 0.0,
        "total_over_term": 60.0,
        "total_payment_to_buy_out": 60.0,
        "total_payment_to_trade_in": 60.0,
        "unit_installment_payment": 1.67,
        "installment_service_fee": 0.0,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": null,
        "contract_type": "FINANCING",
        "linked_service_item_ids": [],
        "subscription_plan": null
      }
    ],
    "service_items": []
  }
}

Cart Ready for Checkout

Below is a typical cart once the customer has obtained a credit approval from the lender.

  • can_checkout is true because this cart is ready checkout.
  • is_compliant is true because this cart has met all the program requirements.
  • compliance_errors is empty because there are no errors.
  • status is draft because the cart has not been checked out yet.
{
  "cart": {
    "cart_id": "mcgzsesbntzw4r9dyq5gs3eex2w",
    "merchant_customer_id": "6b1bf54b-c92d-494a-9a19-4e9a8a9879ae",
    "merchant": {
      "source_channel_id": "ONLINE_SHIP_TO_HOME",
      "store_id": null,
      "employee_id": null
    },
    "country_code": "US",
    "created_at": "2024-03-27T20:27:39Z",
    "currency": "USD",
    "total_sale_price": 1139.0,
    "total_price": 1139.0,
    "total_sales_tax": 0.0,
    "total_installment_payment": 31.64,
    "status": "draft",
    "can_checkout": true,
    "is_compliant": true,
    "compliance_errors": [],
    "rental_items": [
      {
        "cart_item_id": "dqqpzs2y4kbw42a6y8a3dmd2sfg",
        "product_id": "tablet_model_abc_rent",
        "product_name": "Tablet Model ABC",
        "merchant_sku": "1239diw80d9ckb",
        "unit_retail_price": 1079.0,
        "unit_sale_price": 1079.0,
        "residual_value": 0.0,
        "total_over_term": 1079.0,
        "total_payment_to_buy_out": 1079.0,
        "total_payment_to_trade_in": 1079.0,
        "unit_installment_payment": 29.98,
        "installment_service_fee": 0.0,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": null,
        "contract_type": "RENT",
        "linked_service_item_ids": [],
        "subscription_plan": {
          "subscription_plan_id": "standard-plan",
          "plan_code": "standard",
          "plan_name": "Standard Plan",
          "plan_subtitle": "This is the basic plan.",
          "plan_summary": "Total financed amount when you upgrade is $1,079 and includes 36 months of payments. T&Cs, fees, charges & exclusions apply."
        }
      }
    ],
    "finance_items": [
      {
        "cart_item_id": "8rw46qspxx824jarx6h4h7sg4ya",
        "product_id": "tablet_headphones_v3_red",
        "product_name": "Tablet Headphones V3 - Red",
        "merchant_sku": "994kjbjslekff3",
        "unit_retail_price": 60.0,
        "unit_sale_price": 60.0,
        "residual_value": 0.0,
        "total_over_term": 60.0,
        "total_payment_to_buy_out": 60.0,
        "total_payment_to_trade_in": 60.0,
        "unit_installment_payment": 1.67,
        "installment_service_fee": 0.0,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": null,
        "contract_type": "FINANCING",
        "linked_service_item_ids": [],
        "subscription_plan": null
      }
    ],
    "service_items": []
  }
}

Cart During Async Checkout Process

Below is a typical cart after a merchant has called the cart checkout api and the checkout process is running.

  • can_checkout is false because this cart has already been checked out.
  • is_compliant is true because this cart has met all the program requirements.
  • compliance_errors is empty because there are no errors.
  • status is checkout_in_progress because the cart checkout is in progress.
{
  "cart": {
    "cart_id": "mcgzsesbntzw4r9dyq5gs3eex2w",
    "merchant_customer_id": "6b1bf54b-c92d-494a-9a19-4e9a8a9879ae",
    "merchant": {
      "source_channel_id": "ONLINE_SHIP_TO_HOME",
      "store_id": null,
      "employee_id": null
    },
    "country_code": "US",
    "created_at": "2024-03-27T20:27:39Z",
    "currency": "USD",
    "total_sale_price": 1139.0,
    "total_price": 1139.0,
    "total_sales_tax": 0.0,
    "total_installment_payment": 31.64,
    "status": "checkout_in_progress",
    "can_checkout": false,
    "is_compliant": true,
    "compliance_errors": [],
    "rental_items": [
      {
        "cart_item_id": "dqqpzs2y4kbw42a6y8a3dmd2sfg",
        "product_id": "tablet_model_abc_rent",
        "product_name": "Tablet Model ABC",
        "merchant_sku": "1239diw80d9ckb",
        "unit_retail_price": 1079.0,
        "unit_sale_price": 1079.0,
        "residual_value": 0.0,
        "total_over_term": 1079.0,
        "total_payment_to_buy_out": 1079.0,
        "total_payment_to_trade_in": 1079.0,
        "unit_installment_payment": 29.98,
        "installment_service_fee": 0.0,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": null,
        "contract_type": "RENT",
        "linked_service_item_ids": [],
        "subscription_plan": {
          "subscription_plan_id": "standard-plan",
          "plan_code": "standard",
          "plan_name": "Standard Plan",
          "plan_subtitle": "This is the basic plan.",
          "plan_summary": "Total financed amount when you upgrade is $1,079 and includes 36 months of payments. T&Cs, fees, charges & exclusions apply."
        }
      }
    ],
    "finance_items": [
      {
        "cart_item_id": "8rw46qspxx824jarx6h4h7sg4ya",
        "product_id": "tablet_headphones_v3_red",
        "product_name": "Tablet Headphones V3 - Red",
        "merchant_sku": "994kjbjslekff3",
        "unit_retail_price": 60.0,
        "unit_sale_price": 60.0,
        "residual_value": 0.0,
        "total_over_term": 60.0,
        "total_payment_to_buy_out": 60.0,
        "total_payment_to_trade_in": 60.0,
        "unit_installment_payment": 1.67,
        "installment_service_fee": 0.0,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": null,
        "contract_type": "FINANCING",
        "linked_service_item_ids": [],
        "subscription_plan": null
      }
    ],
    "service_items": []
  }
}

Cart After Checkout

Below is a typical cart after a merchant has called the cart checkout api.

  • can_checkout is false because this cart has already been checked out.
  • is_compliant is true because this cart has met all the program requirements.
  • compliance_errors is empty because there are no errors.
  • status is checkout_complete because the cart been checked out.
{
  "cart": {
    "cart_id": "mcgzsesbntzw4r9dyq5gs3eex2w",
    "merchant_customer_id": "6b1bf54b-c92d-494a-9a19-4e9a8a9879ae",
    "merchant": {
      "source_channel_id": "ONLINE_SHIP_TO_HOME",
      "store_id": null,
      "employee_id": null
    },
    "country_code": "US",
    "created_at": "2024-03-27T20:27:39Z",
    "currency": "USD",
    "total_sale_price": 1139.0,
    "total_price": 1139.0,
    "total_sales_tax": 0.0,
    "total_installment_payment": 31.64,
    "status": "checkout_complete",
    "can_checkout": false,
    "is_compliant": true,
    "compliance_errors": [],
    "rental_items": [
      {
        "cart_item_id": "dqqpzs2y4kbw42a6y8a3dmd2sfg",
        "product_id": "tablet_model_abc_rent",
        "product_name": "Tablet Model ABC",
        "merchant_sku": "1239diw80d9ckb",
        "unit_retail_price": 1079.0,
        "unit_sale_price": 1079.0,
        "residual_value": 0.0,
        "total_over_term": 1079.0,
        "total_payment_to_buy_out": 1079.0,
        "total_payment_to_trade_in": 1079.0,
        "unit_installment_payment": 29.98,
        "installment_service_fee": 0.0,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": null,
        "contract_type": "RENT",
        "linked_service_item_ids": [],
        "subscription_plan": {
          "subscription_plan_id": "standard-plan",
          "plan_code": "standard",
          "plan_name": "Standard Plan",
          "plan_subtitle": "This is the basic plan.",
          "plan_summary": "Total financed amount when you upgrade is $1,079 and includes 36 months of payments. T&Cs, fees, charges & exclusions apply."
        }
      }
    ],
    "finance_items": [
      {
        "cart_item_id": "8rw46qspxx824jarx6h4h7sg4ya",
        "product_id": "tablet_headphones_v3_red",
        "product_name": "Tablet Headphones V3 - Red",
        "merchant_sku": "994kjbjslekff3",
        "unit_retail_price": 60.0,
        "unit_sale_price": 60.0,
        "residual_value": 0.0,
        "total_over_term": 60.0,
        "total_payment_to_buy_out": 60.0,
        "total_payment_to_trade_in": 60.0,
        "unit_installment_payment": 1.67,
        "installment_service_fee": 0.0,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": null,
        "contract_type": "FINANCING",
        "linked_service_item_ids": [],
        "subscription_plan": null
      }
    ],
    "service_items": []
  }
}
get/carts/{cart_id}

Request

  • Base URL
    https://api.liftforward.com
  • Auth
    API key in header Api-Key

Path parameters

cart_idstring required

Response

Show Cart

Example response

{
  "cart": {
    "cart_id": "rknvt6atnp72x7x4dy2c34rh3hw",
    "merchant_customer_id": "8c8k2jhzaq46pbjpd5bp9m59z5b",
    "merchant": {
      "source_channel_id": "ONLINE_SHIP_TO_HOME",
      "store_id": "3028478594",
      "employee_id": "39383473893939",
      "merchant_metadata": {
        "custom_key_1": "custom_value_1",
        "custom_key_2": "custom_value_2"
      }
    },
    "country_code": "US",
    "created_at": "2021-08-13T20:30:59Z",
    "currency": "USD",
    "total_sale_price": 1259.99,
    "total_price": 1366.49,
    "total_sales_tax": 106.5,
    "total_installment_payment": 56.94,
    "status": "checkout_complete",
    "compliance_errors": [
      {
        "key": "over_limit",
        "type": "over_limit"
      }
    ],
    "sales_tax_rates": [
      {
        "sales_tax_rate_code": "VAT",
        "rate": 0.0875,
        "amount": 26.25
      }
    ],
    "rental_items": [
      {
        "cart_item_id": "4sbfbsrnqkax7sc77n27shmb54n",
        "product_id": "snzqb89yamhaqexyrkmj5j773fn",
        "product_name": "Super cool product",
        "merchant_sku": "SUPER-PRODUCT-123",
        "unit_retail_price": 350,
        "unit_sale_price": 350,
        "total_payment_to_buy_out": 2030,
        "total_payment_to_trade_in": 2030,
        "unit_installment_payment": 9.91,
        "installment_service_fee": 9.95,
        "total_installment_service_fee": 9.95,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": 1,
        "inventory_message": "Available Now",
        "inventory_help_message": "Available Now",
        "contract_type": "FINANCING",
        "residual_value_category": "iPhone 16",
        "sales_tax_rates": [
          {
            "sales_tax_rate_code": "VAT",
            "rate": 0.0875,
            "amount": 26.25
          }
        ],
        "linked_service_item_ids": [
          "v2a74msban4wbcn738fta6j67rt"
        ],
        "linked_cart_item_ids": [
          "t7tq5tnesgcxd85vgbd3egg847s"
        ],
        "subscription_plan": {
          "subscription_plan_id": "standard-plan-30",
          "program_code": "subscription-us",
          "plan_code": "standard",
          "plan_name": "Standard Plan",
          "plan_subtitle": "This is the basic plan.",
          "plan_summary": "Total financed amount when you upgrade is $2,090 and includes 25 months of payments. T&Cs, fees, charges & exclusions apply.",
          "financing_plan_type": "financing"
        }
      }
    ],
    "finance_items": [
      {
        "cart_item_id": "4sbfbsrnqkax7sc77n27shmb54n",
        "product_id": "snzqb89yamhaqexyrkmj5j773fn",
        "product_name": "Super cool product",
        "merchant_sku": "SUPER-PRODUCT-123",
        "unit_retail_price": 350,
        "unit_sale_price": 350,
        "total_payment_to_buy_out": 2030,
        "total_payment_to_trade_in": 2030,
        "unit_installment_payment": 9.91,
        "installment_service_fee": 9.95,
        "total_installment_service_fee": 9.95,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": 1,
        "inventory_message": "Available Now",
        "inventory_help_message": "Available Now",
        "contract_type": "FINANCING",
        "residual_value_category": "iPhone 16",
        "sales_tax_rates": [
          {
            "sales_tax_rate_code": "VAT",
            "rate": 0.0875,
            "amount": 26.25
          }
        ],
        "linked_service_item_ids": [
          "v2a74msban4wbcn738fta6j67rt"
        ],
        "linked_cart_item_ids": [
          "t7tq5tnesgcxd85vgbd3egg847s"
        ],
        "subscription_plan": {
          "subscription_plan_id": "standard-plan-30",
          "program_code": "subscription-us",
          "plan_code": "standard",
          "plan_name": "Standard Plan",
          "plan_subtitle": "This is the basic plan.",
          "plan_summary": "Total financed amount when you upgrade is $2,090 and includes 25 months of payments. T&Cs, fees, charges & exclusions apply.",
          "financing_plan_type": "financing"
        }
      }
    ],
    "service_items": [
      {
        "cart_item_id": "4sbfbsrnqkax7sc77n27shmb54n",
        "product_id": "snzqb89yamhaqexyrkmj5j773fn",
        "product_name": "Super cool product",
        "merchant_sku": "SUPER-PRODUCT-123",
        "unit_retail_price": 350,
        "unit_sale_price": 350,
        "total_payment_to_buy_out": 2030,
        "total_payment_to_trade_in": 2030,
        "unit_installment_payment": 9.91,
        "installment_service_fee": 9.95,
        "total_installment_service_fee": 9.95,
        "currency": "USD",
        "installment_count": 36,
        "cart_max_quantity": 1,
        "inventory_message": "Available Now",
        "inventory_help_message": "Available Now",
        "contract_type": "FINANCING",
        "residual_value_category": "iPhone 16",
        "sales_tax_rates": [
          {
            "sales_tax_rate_code": "VAT",
            "rate": 0.0875,
            "amount": 26.25
          }
        ],
        "linked_service_item_ids": [
          "v2a74msban4wbcn738fta6j67rt"
        ],
        "linked_cart_item_ids": [
          "t7tq5tnesgcxd85vgbd3egg847s"
        ],
        "subscription_plan": {
          "subscription_plan_id": "standard-plan-30",
          "program_code": "subscription-us",
          "plan_code": "standard",
          "plan_name": "Standard Plan",
          "plan_subtitle": "This is the basic plan.",
          "plan_summary": "Total financed amount when you upgrade is $2,090 and includes 25 months of payments. T&Cs, fees, charges & exclusions apply.",
          "financing_plan_type": "financing"
        }
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 8 revisions of this API.