Introduction
Overview
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.
Attribute | Data type | Description | Required Format |
---|---|---|---|
first_name | string | First name of the customer | none |
last_name | string | last name of the customer | none |
address | string | customer's line 1 of address | none |
address2 | string | customer's line 2 of address | none |
city | string | customer's city | none |
state | string | customer's abbreviated state code | 2 digit alpha code |
country | string | customer's country | US |
zip | string | customer's zip code | 5 digits number |
phone | string | customer's phone number | 10 digits number |
string | customer's email address to receive lease agreement and notifications | none |
Items
Attribute | Data type | Description | Format |
---|---|---|---|
display_name | string | name of the item in the cart | none |
sku | string | retailer defined and specific stock keeping unit to identify the product/item in the cart | SKU must be under 127 characters |
unit_price | string or integer input, string output | cash price of and item at a quantity of 1 | USD Currency |
quantity | integer | number of a specific item in the cart | number |
leasable | boolean | indication if the warranty is leasable or not | true/ false |
Warranty
Attribute | Data Type | Description | format |
---|---|---|---|
unit_price | string or integer input, string output | cash price of and item at a quantity of 1 | USD Currency |
display_name | string | name of the item in the cart | none |
sku | string | retailer defined and specific stock keeping unit to identify the warranty in the cart | SKU must be under 127 characters |
Checkout
Attribute | Data type | Description | Format |
---|---|---|---|
customer_id | string | Unique identifier provided by the merchant for the customer id | string |
shipping_amount | string or integer input, string output | The $ amount of the discount. | USD Currency |
discount_name | string | Name of the discount | string |
discount_amount | string or integer input, string output | The $ 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"
}
Updated 3 months ago