> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bubblav.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Walley

> Let customers check Walley order status, refunds, and invoice payments in chat

Connect a Walley Merchant Hub API key so customers can ask about their Walley orders in chat: whether an order was shipped and charged, whether a refund was made, and whether a Walley invoice is paid. BubblaV adds two read-only chatbot tools; nothing is installed on your site through Walley.

## Why Connect Walley?

> **Order Status**
>
> Show order status, payment method, items with shipped or refunded state, and the refunded amount.

> **Invoice Payments**
>
> Show Walley invoice payment status and due date, so customers can see if an invoice is paid.

> **Order History**
>
> Customers who do not know their order number can list recent orders by the email address used at checkout.

## Prerequisites

* A BubblaV website with edit access
* A Walley Merchant Hub account that can create API keys
* Available on all plans

## Setup Steps

**1. Create an API key in Merchant Hub**

In Walley Merchant Hub, open **Manage Organization** → **API keys** → **Create new** → **Api key**. Copy the **Client ID** and the **Secret**. The secret is shown only once, and keys expire. For testing, create the key in the test Merchant Hub (merchanthub.aks.uat.walleydev.com); test keys see only test orders.

**2. Connect Walley**

Open that website's **Dashboard** → **Integrations** → **Built-in Integrations** → **Walley**, click **Connect**, and enter the **Client ID** and **Client Secret**. Tick **These are test environment credentials** only for test keys.

**3. BubblaV adds the tools**

BubblaV validates the key with a live API call and adds the two Walley tools to your chatbot.

**4. Test**

Ask the chatbot about a real order with its order number and email address, then ask for order history with an email address.

## Available Tools After Connection

| Tool | Parameters and Behavior | Example Query |
| - | - | - |
| `walley_get_order` | Required `order_number` and `customer_email`. The email must match the order. Returns order status, payment method, total, items with shipped or refunded state, refunded amount, and invoice payment status and due date. | "What is the status of order 100234? My email is [anna@example.com](mailto:anna@example.com)" |
| `walley_customer_orders` | Required `customer_email`. Returns up to 10 recent orders with order number, status, payment method, total, and date. | "Show my recent orders. My email is [anna@example.com](mailto:anna@example.com)" |

The tools only read data. They do not capture, refund, or cancel orders. Personal ID numbers, names, addresses, and phone numbers are never shown in the chat.

## Test Your Integration

Try these queries in your storefront chat:

* "What is the status of order 100234? My email is [anna@example.com](mailto:anna@example.com)" — use a real order number and the email used on that order.
* "Was my refund done for order 100234? My email is [anna@example.com](mailto:anna@example.com)"
* "Show my recent orders. My email is [anna@example.com](mailto:anna@example.com)"

## Troubleshooting

> **Walley rejected the API credentials on connect**
>
> Check that the Client ID and Secret are copied in full, that the key has not expired, and that the **These are test environment credentials** box matches the key: test keys come from the test Merchant Hub and work only in the test environment; production keys come from merchanthub.walleypay.com.

> **The chatbot says the order was not found**
>
> The order number and the email address must both match the order. A new order can take a minute to appear, so try again shortly. For privacy, the chatbot gives the same answer when the number is unknown and when the email does not match.

> **Orders fail with an access error**
>
> Your API key may not cover the store that took the order, or the key has expired. Create a new key in Merchant Hub, then disconnect and connect Walley again.

> **Replace the key or switch between test and production**
>
> On the Walley integration card, click **Disconnect**, then click **Connect** and enter the new Client ID and Secret. Tick **These are test environment credentials** only for test keys.

> **Tools are missing after connecting**
>
> If BubblaV shows **Connected, but the chatbot tools were not added**, or tools are missing, open the integration's **Configure** page and click **Sync Tools**. Then check that the Walley tools are enabled.

> [!NOTE]
>
> **Security**: Your Client Secret is stored encrypted, and the tools only read data. A visitor must give both the order number and the matching email address to see an order.

## Next Steps

> **[Customize Your Widget](https://docs.bubblav.com/user-guide/widget-design.md)**
>
> Match the chat widget to your storefront's appearance.

> **[Test Your Chatbot](https://docs.bubblav.com/user-guide/testing.md)**
>
> Check order answers and your configured website knowledge.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.