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

# Connect Your Billgang Store to Discord with Quarky

> Integrate your Billgang store with Discord using Quarky to showcase products and receive real-time order, feedback, query, and stock alert notifications.

Quarky's Billgang integration bridges your Billgang store and your Discord server. Once connected, you can showcase products, receive real-time order notifications, handle customer feedback and queries, and get low-stock alerts — all from within Discord.

## What you can do

* **Showcase products** — browse and display product details from your store using slash commands
* **Real-time order updates** — receive instant Discord notifications when orders are created, completed, expired, or cancelled
* **Customer feedback and queries** — route reviews and support tickets to dedicated forum channels
* **Low and out-of-stock alerts** — get notifications before inventory runs out

## Getting started

<Steps>
  <Step>
    Go to [dash.billgang.com/developers/api-keys](https://dash.billgang.com/developers/api-keys) and click **Create New Key**.

    Give the key a name, set **Expiration Date** to **No expiration**, then click **Generate New Key**. Copy the key that appears. <img src="https://imgur.com/5ayQWLz.png" />
  </Step>

  <Step>
    In any channel where Quarky has access, run `/billgang setup` to start the setup flow.
  </Step>

  <Step>
    When the bot asks for your **API KEY**, paste the key you copied from Billgang.
  </Step>

  <Step>
    When prompted for your **shop name**, enter the subdomain from your Billgang store URL. For example, if your URL is `my-store.billgang.store`, enter `my-store`.
  </Step>
</Steps>

## Webhooks setup

To receive order, feedback, query, and stock alert notifications in Discord, you need to register Quarky's webhook endpoint in your Billgang dashboard.

<Steps>
  <Step>
    Go to [dash.billgang.com/developers/webhooks](https://dash.billgang.com/developers/webhooks) and click **New Endpoint** in the top-right corner.
  </Step>

  <Step>
    In the **Webhook URI** field, enter the following URL:

    ```text theme={null}
    https://public.quarkybot.com/webhooks/billgang
    ```

    ![](https://imgur.com/VpsBx9z.png)
  </Step>

  <Step>
    In the events section, enable the following **Order Events**:

    * `order:created`
    * `order:expired`
    * `order:cancelled`
    * `order:completed` <img src="https://imgur.com/aC1kSE4.png" />
  </Step>

  <Step>
    Enable the following review event:

    * `review:created` <img src="https://imgur.com/4BKt1qJ.png" />
  </Step>

  <Step>
    Enable the following events for stock and support tickets:

    * `warehouse:low:stock`
    * `warehouse:out:of:stock`
    * `ticket:created`
    * `ticket:message:received` <img src="https://imgur.com/2CDEzgq.png" />
  </Step>

  <Step>
    Click **Create Webhook Endpoint** to save. Confirm that all events are listed on the webhooks page before continuing. <img src="https://imgur.com/nFViyEL.png" />
  </Step>
</Steps>

## Channel assignment

With webhooks configured, run `/billgang setup` again in your Discord server to assign a channel to each notification type. <img src="https://imgur.com/YYQjqro.png" />

<Steps>
  <Step title="Orders">
    Choose the channel where order notifications should appear, then click **Next**. <img src="https://imgur.com/XlANNvZ.png" />
  </Step>

  <Step title="Feedback">
    Choose a **Forum Channel** for customer feedback (reviews), then click **Next**. <img src="https://imgur.com/tNS9RiF.png" />

    <Info>
      The feedback channel must be a Forum Channel, not a standard text channel.
    </Info>
  </Step>

  <Step title="Queries">
    Choose a **Forum Channel** for customer queries (support tickets), then click **Next**. <img src="https://imgur.com/5wmv5p7.png" />

    <Info>
      The queries channel must also be a Forum Channel.
    </Info>
  </Step>

  <Step title="Low and out-of-stock alerts">
    Click **Stock** and choose whether to enable stock alerts. When enabled, Quarky sends notifications whenever a product is low or out of stock. <img src="https://imgur.com/jmD6hXJ.png" />
  </Step>
</Steps>

## Slash commands

Use these commands to interact with your Billgang store from Discord.

| Command              | Subcommand | Description                                |
| -------------------- | ---------- | ------------------------------------------ |
| `/billgang setup`    | —          | Connect and configure your Billgang store. |
| `/billgang product`  | `get`      | Get product details by ID.                 |
| `/billgang product`  | `list`     | List all public products.                  |
| `/billgang coupon`   | `create`   | Create a new coupon.                       |
| `/billgang coupon`   | `get`      | Get coupon details by ID.                  |
| `/billgang coupon`   | `list`     | List all coupons.                          |
| `/billgang order`    | `get`      | Get order details by ID.                   |
| `/billgang order`    | `list`     | List all orders.                           |
| `/billgang order`    | `process`  | Process an order manually by ID.           |
| `/billgang feedback` | `get`      | Get feedback details by ID.                |
| `/billgang feedback` | `list`     | List all feedback.                         |
| `/billgang query`    | `get`      | Get query details by ID.                   |
| `/billgang query`    | `list`     | List all queries.                          |

<Note>
  Need help? Join the [Quarky Support Server](https://discord.gg/Kf4BdwAThQ) and our team will assist you.
</Note>
