# Tebex

## <mark style="color:blue;">Introduction</mark>

The Tebex configuration file (`tebex.json`) integrates your Tebex store with Discord for purchase notifications, coupon management, and payment event logging.

***

## <mark style="color:blue;">Tebex Secret Key</mark>

**Type:** String

Your Tebex API secret key.

```json
tebex_secret_key: "your_secret_key_here"
```

**Required for:**

* Creating/modifying/deleting gift cards
* Creating/modifying/deleting coupons
* Banning users from your store

**How to find it:** <https://docs.tebex.io/store/faq#how-can-i-find-my-secret-key>

{% hint style="danger" %}
**Security Warning:** Never share this key with untrusted individuals. This key grants full access to your Tebex store management.
{% endhint %}

***

## <mark style="color:blue;">Tebex Webhook Secret</mark>

**Type:** String

Webhook secret for verifying Tebex requests.

```json
tebex_webhook_secret: "your_webhook_secret_here"
```

**Setup Instructions:**

1. Visit <https://creator.tebex.io/webhooks/endpoints>
2. Create a new webhook endpoint
3. Set URL to: `http://<web_api_baseip>:<web_api_port>/api/tebex`
4. Select webhook type: "All events" (enable all checkboxes)
5. Copy the webhook secret to this config

**Required for:**

* Purchase notifications
* Admin and player logs
* All store event tracking

***

## <mark style="color:blue;">Tebex Logs</mark>

**Type:** Object

Configure which store events should be logged to Discord.

```json
tebex_logs: {
    purchase_public: true,
    purchase_private: true,
    payment_declined: true,
    payment_refunded: true,
    payment_dispute_opened: true,
    payment_dispute_closed: true,
    payment_dispute_won: true,
    payment_dispute_lost: true,
}
```

### <mark style="color:yellow;">purchase\_public</mark>

**Type:** Boolean

Public purchase announcement for your community.

**When `true`:** Sends a community-friendly purchase notification (no sensitive info like price)\
**When `false`:** No public announcement

***

### <mark style="color:yellow;">purchase\_private</mark>

**Type:** Boolean

Detailed purchase log for admins.

**When `true`:** Sends detailed purchase information to admin channel\
**When `false`:** No private admin log

Contains more detailed information than public announcements.

***

### <mark style="color:yellow;">payment\_declined</mark>

**Type:** Boolean

Log when payments are declined.

```json
payment_declined: true
```

***

### <mark style="color:yellow;">payment\_refunded</mark>

**Type:** Boolean

Log when payments are refunded.

```json
payment_refunded: true
```

***

### <mark style="color:yellow;">payment\_dispute\_opened</mark>

**Type:** Boolean

Log when payment disputes/chargebacks are opened.

```json
payment_dispute_opened: true
```

***

### <mark style="color:yellow;">payment\_dispute\_closed</mark>

**Type:** Boolean

Log when payment disputes are closed.

```json
payment_dispute_closed: true
```

***

### <mark style="color:yellow;">payment\_dispute\_won</mark>

**Type:** Boolean

Log when payment disputes are won in your favor.

```json
payment_dispute_won: true
```

***

### <mark style="color:yellow;">payment\_dispute\_lost</mark>

**Type:** Boolean

Log when payment disputes are lost.

```json
payment_dispute_lost: true
```

***

## <mark style="color:blue;">Store Link</mark>

**Type:** String

Your Tebex store URL.

```json
store_link: "https://yourstore.tebex.io"
```

**When configured:** A "Visit Store" button is added to public purchase announcements\
**When empty:** No button is displayed

***

## <mark style="color:blue;">Complete Configuration Example</mark>

Here's a production-ready Tebex configuration:

```json
{
    config: {
        tebex_secret_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",

        tebex_webhook_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",

        tebex_logs: {
            purchase_public: true,
            purchase_private: true,
            payment_declined: true,
            payment_refunded: true,
            payment_dispute_opened: true,
            payment_dispute_closed: true,
            payment_dispute_won: true,
            payment_dispute_lost: true,
        },

        store_link: "https://yourstore.tebex.io",
    },
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iynxdev.com/configuration-files/tebex.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
