Initialize Checkout

Overivew

To check out with Katapult, you must first initialize the cart object with the following information:

  • Customer information - This is the billing and shipping information that the customer has already entered on your site. Katapult requires that the customers billing and shipping address match.

  • Item data - The contents of the customer’s shopping cart, including warranty, & shipping details. In the item details we do require that your team implements an attribute to categorize items as leasable T/F.

  • Checkout data - Metadata on the transaction, such as the order id and any applicable discounts.

  • Cart ID vs. Order ID - If your cart id is different form the order id you will need to use the Confirm Order API to update the order after it has been initialized.

  • Sync Endpoint - Sync Origination will allow you to easily grab the UID from Katapult in the event you were unable to capture it on the GET and POST.

Checkout Data

Billing & Shipping

Billing and shipping details must include the following details.

AttributeData typeDescriptionRequired Format
first_namestringFirst name of the customernone
last_namestringlast name of the customernone
addressstringcustomer's line 1 of addressnone
address2stringcustomer's line 2 of addressnone
citystringcustomer's citynone
statestringcustomer's abbreviated state code2 digit alpha code
countrystringcustomer's countryUS
zipstringcustomer's zip code5 digits number
phonestringcustomer's phone number10 digits number
emailstringcustomer's email address to receive lease agreement and notificationsnone

Items

AttributeData typeDescriptionFormat
display_namestringname of the item in the cartnone
skustringretailer defined and specific stock keeping unit to identify the product/item in the cartSKU must be under 127 characters
unit_pricestring or integer input, string outputcash price of and item at a quantity of 1USD Currency
quantityintegernumber of a specific item in the cartnumber
leasablebooleanindication if the warranty is leasable or nottrue/ false

Warranty

AttributeData TypeDescriptionformat
unit_pricestring or integer input, string outputcash price of and item at a quantity of 1USD Currency
display_namestringname of the item in the cartnone
skustringretailer defined and specific stock keeping unit to identify the warranty in the cartSKU must be under 127 characters

Checkout

AttributeData typeDescriptionFormat
customer_idstringUnique identifier provided by the merchant for the customer idstring
shipping_amountstring or integer input, string outputThe $ amount of the discount.USD Currency
discount_namestringName of the discountstring
discount_amountstring or integer input, string outputThe $ amount of the discount.USD Currency

Request Payload

<script>


$('.btn-katapult-checkout').on('click', function() {
  var checkout = {
     customer: {
         billing: {
             first_name: "jane",
             middle_name: "Q",
             last_name: "doe",
             address: "123 main street",
             address2: "apt 5b",
             city: "New York",
             state: "NY",
             country: "United States",
             zip: "10009",
             phone: "5554324537",
             email: "[email protected]"
         },
         shipping: {
             first_name: "jane",
             middle_name: "Q",
             last_name: "doe",
             address: "123 main street",
             address2: "apt 5b",
             city: "New York",
             state: "NY",
             country: "United States",
             zip: "10009",
             phone: "5554324537",
             email: "[email protected]"
         }
     },

    items: [{
      display_name: "4K LG TV",
      sku: "LG-4k2352",
      unit_price: 1399.99,
      quantity: 1,
      leasable: true,
      warranty: {
        unit_price: 100.10,
        display_name: "2 Years Warranty",
        sku: "LG-02-WARRANTY"
      }
    }],

    checkout: {
      customer_id: "1000438727823",
      shipping_amount: 20.00,
      discounts: [
         {discount_name: "Discount name 1", discount_amount: 50.00},
         {discount_name: "Discount name 2", discount_amount: 50.00}
      ]
    },

    urls: {
        return: "https://yoursite.com/return",
        cancel:"https://yoursite.com/cancel"
    }

  };
  katapult.checkout.set(checkout);
  katapult.checkout.load();
});


</script>

URLs

Your team will need to implement the following URLs to indicate to Katapult where the customer needs to be send at the end of their session.
These URLS will need to be set by your team depending on where you want the customer to be directed to after they have completed or abandoned an order.

👍

Whitelist Katpault

Whitelist https://sandbox.katapult.com, www.katapult.com or *.katapult.com to ensure that you do not have any issues with the post callback.

Return: You will handle the POST and GET on the same the return URL.

The GET will redirect the customers to your order confirmation page or the thank you page, wherever you want the customer to go after their payment has been successfully completed.

The POST will return to that URL with the customer_id provided and the katapult_id associated with the order.

Post Callback Return URL
Katapult will POST the following details to the return URL

  • UID
  • customer_id provided by the merchant
  • zibby_id
{"customer_id":"1905","uid":"41f895b59ae64b2c9285805fbf981c7c","zibby_id":"649916534"}

👍

Sync Origintions

If you are having issues with getting the data on the POST call back return URL you can always leverage our Sync API. Here you can submit the order ID to Katapult and we will return the UID, Customer ID, and Zibby ID.

Cancel: The cancel URL is where the customer will get redirect in the event they abandoned the checkout with Katapult or close out of module before completing down payment.

urls: {
        return: "https://yoursite.com/return",
        cancel:"https://yoursite.com/cancel"
    }

What’s Next