> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.getgreenspark.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Rebuy Smart Cart App Installation

In this guide we will cover how to add the Greenspark widgets to your Rebuy Smart Cart.

# 1. Create a Greenspark Widget API Key

In order to dynamically show the correct widget in your Rebuy Smart Cart, your account needs to have an active Widget API Key.

|| If you already have an active Widget API Key, then skip to step 2.

To create your Widget API Key simply head to `Account -> API -> Create API Key` within your Greenspark account. Give the key a name, choose `Widget API` as the `Type` and click on `Create API Key`.

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/rebuy-widget-api-key_l2ec66.png)

# 2. Choose the Greenspark widget you want to add to Rebuy

Now that you have your Widget API Key set up, head to `Engagement Hub -> Badges & Widgets` within your Greenspark dashboard. So that you can easily see which widgets are compatible with Rebuy they are tagged in the list.

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/rebuy-tag_ji42zx.png)

Click on the widget you want to use within your Rebuy Smart Cart

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/rebuy-use-widget_ry4nxs.png)

Then choose the `Rebuy Smart Cart` tab, select the store you want to add the widget to and copy the `Rebuy API Key` (you will need to insert this into Rebuy later)

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/rebuy-overlay_ie39wb.png)

# 3. Add the Widget to Rebuy

In Rebuy, go to the `Smart Cart` section, in your admin dashboard and access the Smart Cart that you want to add the Greenspark badge to. 

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/rebuy-ui_192wlde.png)

When editing or creating the Smart Cart, scroll down to the `Apps` section and look for `Greenspark`. Click on `Edit`, paste the `Rebuy API Key` that you copied in `step 2` into the input field provided and click `Save`.

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/rebuy-widget-api_11ydtgo.png)

Decide where you want to show the widget in your Smart Cart and enable it so that it will show within your cart.

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/enable-cart_jb21lr.png)

Finally, open your smart cart to use the drag and drop editor to make any final edits.

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/screenshot-2025-02-18-at-12075_j5uw73.png)

|| It's important to note that the cart widget will only show if you have active automations and placed items within your cart. If you need help setting up your automations then check out [this article](/en/article/how-do-i-set-up-my-shopify-triggers-1b3ydp4/).