Skip to main content

Digital Entitlements (Emoji + Private Channel Access)

Ledgerline can automatically grant Discord digital perks when a customer's payment is confirmed. In addition to Discord role grants (which have always been supported via Granted Role IDs), you can now attach emoji access and private channel access to any product.

How It Works

When a payment is confirmed the entitlement pipeline runs in two steps:

  1. Generate — one entitlement record is created per descriptor in the product's grantedEntitlements list (or per entry in the legacy Granted Role IDs field).
  2. Process — each PENDING record is fulfilled via a Discord REST call and marked GRANTED or FAILED.

On refund (full or partial) the pipeline issues the matching revoke calls and marks each record REVOKED.

Entitlement Types

TypeWhat it doesDiscord API used
roleGrants a Discord guild rolePUT /guilds/{guildId}/members/{userId}/roles/{roleId}
emojiSame mechanism as role — emoji access is locked to a role; labeled "Custom Emoji Access" in adminPUT /guilds/{guildId}/members/{userId}/roles/{roleId}
channel_accessGrants VIEW_CHANNEL + SEND_MESSAGES on a specific private channel via a per-user permission overridePUT /channels/{channelId}/permissions/{userId}

Configuring a Product

  1. Open Products in the admin sidebar and click the product you want to configure (or create a new one).
  2. Scroll to the Granted Entitlements field.
  3. Add one row per perk:
Sub-fieldValue
Typerole, emoji, or channel_access
Target IDDiscord role ID (for role or emoji) or Discord channel ID (for channel_access)
Label (optional)Human-readable name shown in admin UI, e.g. "Resurrected Role"
  1. Click Save.

Backward compatibility: The legacy Granted Role IDs array field still works and is treated as a list of role-type entitlements at fulfilment time. You do not need to migrate existing products unless you want to add emoji or channel access.

Sample Product Configuration

A "Resurrected Member" product might look like this:

{
"name": "Resurrected Member",
"sku": "RES-001",
"priceCents": 4999,
"grantedEntitlements": [
{ "type": "role", "targetId": "1234567890123456789", "label": "Resurrected Role" },
{ "type": "emoji", "targetId": "9876543210987654321", "label": "Custom Emoji Access" },
{ "type": "channel_access", "targetId": "1111222233334444555", "label": "Resurrected Members Only" }
]
}

After payment is confirmed the customer receives:

  • The Resurrected Role (unlocks the emoji server-side).
  • A per-user permission override on the private channel granting VIEW + SEND.

On full refund, all three are revoked automatically.

Viewing Entitlement Records

Open Entitlements in the admin sidebar (under Users & Identity). Use the Type filter to narrow by DISCORD_ROLE, DISCORD_EMOJI, CHANNEL_ACCESS, or DIGITAL_ITEM. The Target ID column shows the Discord role or channel ID for each record.

Records in FAILED state can be retried by clicking Edit / Retry and saving.

Required Bot Permissions

Entitlement typeRequired bot permission
role / emojiManage Roles (the bot's highest role must be above the role being granted)
channel_accessManage Channels or Manage Permissions on the target channel