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

# Discord bots and roles

> Connect a bot and configure the Discord access buyers receive.

## Set it up

**1. Connect a bot**

Open Team → Discord bots and follow the token and server setup instructions. Keep the token private.

**2. Configure the integration**

Open Team → Discord roles and choose the server and integration settings.

**3. Attach the right role**

Configure the product’s Discord role delivery settings and select the role intended for that purchase.

**4. Test permissions**

Make sure the bot is in the server, can manage the role, and sits above the role it must assign in Discord’s hierarchy.

## Buyer identity

A role-delivery product may require the buyer to connect Discord during checkout. The connected Discord account should be the one that needs access, not the seller’s test account by default.

## Required server access

Review the integration’s join or connection requirements. A successful payment cannot compensate for a bot that is missing permissions or cannot find the relevant member.

## Token handling

Never put a bot token in a storefront theme, browser script, product message, or API example. If a token is exposed, rotate it in Discord and update the connection.

## If something does not work

> [!NOTE]
>
> For a missing role, check the completed order, buyer’s Discord ID, server membership, role ID, bot permissions, and role hierarchy.

Still stuck? [Contact support](https://docs.paysum.io/support) with the store, the page, and any order or request reference.

## Next steps

> [card] [How delivery works](https://docs.paysum.io/delivery)
>
> Choose how buyers receive a purchase and verify delivery after payment.

> [card] [The buyer checkout flow](https://docs.paysum.io/checkout-flow)
>
> Understand the steps from a product selection to a paid order and delivery.

> [card] [Teams and permissions](https://docs.paysum.io/team-and-permissions)
>
> Invite collaborators and give them access appropriate to their work.


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