> Add a Plandalf checkout to a Kajabi page with a Custom Code block, beside your Kajabi offers.

Source: https://plandalf.com/docs/websites/kajabi

Websites and builders

# Kajabi

Add a Custom Code block to any Kajabi page and it can open a Plandalf checkout or show one inline. Buyers stay on your Kajabi page while they pay.

**Giving buyers access in Kajabi**

A Plandalf purchase doesn't grant a Kajabi offer by itself. To enrol buyers in a Kajabi product after they pay, add the Kajabi app in Plandalf's automations. See [Kajabi automations](https://plandalf.com/docs/automations/kajabi).

## Add the script

These are the install steps for Kajabi. Copy the script from your checkout's **Share** screen (pick **HTML**) so it holds your own address.

1.  ### Install the SDK
    
    Website → Pages → select the page → Add Section → Custom Code. Paste the script.
    
    ```html
    <script async src="https://YOUR-ORG.plandalf.dev/js/plandalf-sdk.js"></script>
    ```
    
2.  ### Add the trigger button
    
    In the same Custom Code section, paste the HTML.
    
    ```html
    <button data-plandalf-present="YOUR-CHECKOUT">Buy Now</button>
    ```
    
3.  ### Make the first open instant (optional)
    
    Paste this under the SDK script tag on the pages that hold the trigger. It fetches the checkout UI (about 1.2 MB) in the background while the page sits idle, so the click only pays for creating the session. Leave it off pages with no checkout: visitors download it whether or not they buy. In a React app, call sdk.preload('checkout') from the ready callback in an effect instead.
    
    ```html
    <script>
      // Optional: fetch the checkout UI while the page is idle, so the first click opens at once.
      window.plandalf = window.plandalf || function () { (window.plandalf.q = window.plandalf.q || []).push(arguments); };
      plandalf('ready', (sdk) => sdk.preload('checkout'));
    </script>
    ```
    

In the page builder, open a section, click **Add Block** and choose **Custom Code**. Paste the script and the button together into the block's **Code** field, then click **Save** and **Publish**. Add the script once per page; a second Custom Code block on the same page only needs its button or checkout.

## Open a checkout from a button

In a **Custom Code** block, paste:

```html
<script async src="https://YOUR-ORG.plandalf.dev/js/plandalf-sdk.js"></script>
<button data-plandalf-present="YOUR-CHECKOUT">Buy Now</button>
```

Kajabi's own Button block can't carry a Plandalf attribute. To use one anyway, link it to your [hosted checkout link](https://plandalf.com/docs/checkouts/links). More options are in [Buy buttons](https://plandalf.com/docs/checkouts/buy-buttons).

## Show a checkout on the page

In a **Custom Code** block, paste the script and an inline checkout:

```html
<script async src="https://YOUR-ORG.plandalf.dev/js/plandalf-sdk.js"></script>
<div data-plandalf-mount="YOUR-CHECKOUT" style="min-height: 480px"></div>
```

## Show a deadline timer

In a **Custom Code** block, add an empty element with your deadline timer's slug. The script draws the live countdown inside it. To charge the deadline timer's current price, add `data-plandalf-apply-promo` with the same slug to your buy button.

```html
<div data-plandalf-promo="YOUR-PROMO"></div>
<button data-plandalf-present="YOUR-CHECKOUT" data-plandalf-apply-promo="YOUR-PROMO">Buy Now</button>
```

See [Countdowns](https://plandalf.com/docs/promos/countdowns).

## Check it's working

1.  ### Open the published page
    
    Use a private window, not the page builder. In the browser console, type `plandalf`: you should see a function. `undefined` means the script isn't on the page.
    
2.  ### Click your button
    
    The checkout opens over the page.
    
3.  ### Make a test purchase
    
    Use **Open the test checkout** on the Share screen, or add a Kajabi test site in Plandalf under **Settings → Advanced → Test domains**. See [Test mode](https://plandalf.com/docs/get-started/test-mode).
    

## If it isn't working

-   Check the page has the script in a Custom Code block, saved and published.
-   Kajabi's own checkout and upsell pages are separate from your site pages. Put Plandalf on a landing or sales page.
-   Add `data-debug="true"` to the script tag and the console logs each step the script takes.

See [Troubleshooting](https://plandalf.com/docs/help/troubleshooting).

Something wrong or missing? Email [hello@plandalf.com](mailto:hello@plandalf.com).
