The Partial.ly checkout button is a small bit of javascript you can use to embed a Partial.ly checkout button on your shopping cart, product landing, or any other page. The Partial.ly checkout button has many options to customize its appearance and behavior, detailed below.
partially checkout button

General Setup

The general set up consists of an element to render the Partial.ly checkout button inside of, a javascript configuration object, and loading the Partial.ly checkout button script. Below is an example.

<div id="partiallyCheckoutBtn"></div>
<script>
document.partiallyButtonConfig = {
    offer: '<your offer id>',
    amount: 500.99,
    currency: 'USD',
    renderSelector: '#partiallyCheckoutBtn',
    meta: {
        items: [
            {
                id: 123,
                name: 'Sample product',
                quantity: 1,
                price: 500.99,
                total: 500.99,
                sku: 'samplesku',
                image: 'https://example.com/image.jpg'
            }
        ]
    }
};
(function() {
 var script = document.createElement('script');
 script.type = 'text/javascript';
 script.src = 'https://partial.ly/js/partially-checkout-button.js';
 script.async = true;
 document.head.appendChild(script);
})();
</script>

Configuration Options

offer
string The offer id to use when checking out. Use the integration tool for the offer you want to use in the Partial.ly merchant portal
amount
double The total amount of the payment plan
currency
string Currency to use, defaults to USD, or the currency specified in the offer
language
string Language for partial.ly checkout interface; de, en, es, fr, pt, or it. Defaults to en
imageUrl
string Absolute url to an image to use when rendering the checkout button
returnUrl
string Absolute url for links in Partial.ly checkout to cancel checkout and return to the merchant's site
returnConfirmedUrl
string Absolute url for link to return to merchant's site from the payment plan confirmed page
renderSelector
string CSS selector for the element to render checkout button inside of
quantitySelector
string CSS selector for a quantity input element. When using the checkout button on a product landing page it will automatically adjust the payment plan amount when the quantity is changed
attachSelector
string CSS selector for an element to attach to and automatically set the href element. Use this option to not render an image inside the checkout button and use your own custom html
meta
object Meta information about the plan, such as source and items. See meta object details below
customer
object Send default customer information
shopifyCart
object Automatically set the meta information based on a shopify cart object
shopifyProduct
object Automatically set the meta information based on a partially product object
shopifyVariant
object Automatically set the meta item variant information
woocommerceProduct
object Automatically set the meta information based on a woocommerce product. Not needed if using our Partial.ly payment plan plugin for woocommerce
noteSelector
string If you allow your customers to enter special notes for their order, you can provide a css selector to that element and the note field will automatically get updated in the Partial.ly button without the customer needing to submit the form first
customParams
object a map of custom tracking parameters for Partially to forward to the checkout, such as _ga, gclid, or utm tracking parameters

Meta Object Options

source
string The source of the payment plan, if integrating with another software, such as shopify or woocommerce
description
string An optional description for the payment plan
items
array Array of line items, see below for details of the LineItem object. This is only necessary if integrating with a shopping cart platform, such as shopify or woocommerce
note
string An optional note for the order
attributes
object Optional map of attributes for the order

LineItem Object Options

name
string description of the item
price
double price of item
quantity
integer quantity
total
double line item total
product_id
string product id
variant_id
string optional variant id
image
string absolute url for item image
sku
string product sku
weight
double item weight
weight_units
string weight units, g, kg, oz, or lb
properties
object optional map of configurable properties

Customer Object Options

email
string Preset the customer email address for checkout