> 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/integrations-and-commands/discord-linking.md).

# Discord Linking

Linking Discord lets purchases assign roles automatically, so a supporter's rank shows in your community as well as in game. This page covers the purchase-to-role flow.

Before any of it works, the Discord server itself has to be linked: add the PayNow bot, put its role above the roles it will manage, and run `/pnregister <unique_id>` in a channel. Those steps are in [Discord Servers](/integrations-and-commands/discord-servers.md).

## Assign roles in Deliverable Actions

1. Go to **Content → Products**.
2. Create or edit a product.
3. Scroll to **Deliverable Actions**.
4. Click **Add Action** → **Assign Discord Role**.
5. Choose your **Discord Game Server** from the dropdown.
6. Select the **role** to assign on purchase.
7. **Save.**

Customers buying this product now receive the role automatically.

## When roles are removed

On the product's Discord action, **Remove role access on** offers three triggers. A new action starts with **all three ticked**.

| Trigger        | Fires when                                         |
| -------------- | -------------------------------------------------- |
| **Expiration** | The product expires **or you revoke it manually**. |
| **Refund**     | You refund the order.                              |
| **Chargeback** | The customer disputes the charge with their bank.  |

**Revoking runs the expiry path**, so Expiration covers manual revocation too. There is no separate "on revoke" trigger to look for.

{% hint style="warning" %}
**Unticking one of these is how customers keep a role they no longer paid for.** They are on by default for a reason. Untick Chargeback and someone who disputes the charge keeps the role permanently.
{% endhint %}

## FAQ

**Can I link multiple Discord servers?** Yes. Create multiple Discord server integrations, just as you would game servers.

**What permissions does the bot need?** **Manage Roles** to assign roles, and **Read Messages** to process commands. Both are requested automatically when you invite the bot, so no manual adjustment is needed unless permissions are later changed in Discord.

**What happens if a user leaves the server?** If they leave and rejoin, the bot **automatically reassigns their role**, as long as the package is still active and unexpired. It syncs their roles to the current state of their package.

**Linking bounces back to checkout without linking.** Usually the customer's browser: an ad or privacy blocker interrupting the Discord redirect. Have them retry in a private window with extensions off.

**A customer bought but has no role. What now?** They probably never linked their Discord. See [Customers who forget to link Discord](/integrations-and-commands/discord-servers.md#customers-who-forget-to-link-discord).
