> For the complete documentation index, see [llms.txt](https://guides.paynow.gg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guides.paynow.gg/getting-started/faq/packages-faq/discord-linking.md).

# Discord Linking

### **Step 1: Creating a Discord Server Integration**

1. Navigate to **Integrations > Discord Servers** in your PayNow dashboard.
2. Click the **“Add Discord Server”** button.
3. A window will appear with instructions to:
   * **Add the official PayNow Discord Bot** to your Discord server.
   * Copy the provided **registration command** (e.g., `/pnregister <unique_id>`) and run it on your Discord server.
4. Once completed, the Discord server will be **linked** to your PayNow account and will appear in the list.

***

### **Step 2: Connecting the PayNow Bot to Your Discord Server**

1. Click the **"Add Bot"** button.
2. Authorize the **PayNow Bot** to join your Discord server.
3. Make sure the bot's **role is above** the roles you want it to manage.
4. After the bot has been added, run the following command in any channel:

   ```bash
   /pnregister <unique_id>
   ```
5. Once registered, your Discord server will be linked to PayNow.

***

### **Step 3: Assigning Discord Roles in Deliverable Actions**

After linking your Discord server, you can **automate role assignments** through the **Deliverable Actions** when setting up a product.

1. Navigate to **Content > Products** in your dashboard.
2. Click **"Create Product"** or edit an existing product.
3. Scroll down to the **Deliverable Actions** section.
4. Click **"Add Action"** and select **"Assign Discord Role"**.
5. Choose your **Discord Game Server** from the dropdown.
6. Select the **role** that will be assigned upon purchase.
7. Click **Save** to update the product.

{% hint style="info" %}
Customers who purchase this product will automatically receive the selected role in your Discord server.
{% endhint %}

***

### **Step 4: Managing Discord-Based Purchases**

* **Roles are only removed when a package expires** if an **On Expiry Action** is set to remove them.
* **Manually revoking access to a package will remove the assigned Discord role.**

***

## **FAQs**

#### Can I link multiple Discord servers?

Yes! You can create multiple **Discord server integrations**, just like game servers.

#### What permissions does the bot need?

The bot requires **Manage Roles** permission to assign roles and **Read Messages** to process commands.

> **Note:** The required permissions are **automatically requested** when inviting the bot, so no manual adjustments should be needed unless permissions are later changed in Discord.

#### Will roles be removed if I manually revoke a package?

Yes, roles will be removed if you manually revoke a package. The bot will automatically remove the assigned Discord roles upon revoking.

#### What happens if a user leaves the server?

If a user leaves and rejoins, the bot **will automatically reassign their role** as long as their package is still active and has not expired. It syncs their role to match the **current state of their package**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://guides.paynow.gg/getting-started/faq/packages-faq/discord-linking.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
