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

# Automated Benefits

> Provision what a customer paid for the instant they pay — license keys, downloads, repo and Discord access, and prepaid credits — and revoke it the moment they stop.

Collecting a payment is the easy half. The hard half is wiring up everything that has to happen *after* the charge clears — minting a license key, inviting the buyer to a private repo, dropping a Discord role, topping up a usage balance — and then unwinding all of it cleanly when a subscription lapses or a refund lands.

**Benefits** are the entitlement engine that closes that gap. Define an entitlement once, attach it to any product or subscription tier, and Macropay grants access at purchase and revokes it at expiry — automatically. There are no fulfillment cron jobs to babysit and no `customer.subscription.deleted` webhooks to reconcile by hand.

And because Macropay is your [Merchant of Record](/merchant-of-record/introduction), one system does the whole job: it charges the card, remits sales tax and VAT on your behalf, limits your tax liability, *and* drives fulfillment. Billing and entitlement never drift apart, because they're the same flow.

## The benefit types you can attach

A benefit is a reusable resource — configure it once, then link it from as many products as you like.

<CardGroup cols={2}>
  <Card title="Prepaid Credits" icon="coins" href="/features/benefits/credits">
    Top up a customer's usage-meter balance. The backbone of prepaid, metered, and AI/agent billing.
  </Card>

  <Card title="License Keys" icon="key" href="/features/benefits/license-keys">
    Mint branded keys with your own format, expiry, and activation/validation rules.
  </Card>

  <Card title="File Downloads" icon="download" href="/features/benefits/file-downloads">
    Serve downloadable assets of any type — up to 10 GB per file.
  </Card>

  <Card title="GitHub Repository Access" icon="github" href="/features/benefits/github-access">
    Auto-invite paying customers to one or more private repositories.
  </Card>

  <Card title="Discord Invite" icon="discord" href="/features/benefits/discord-access">
    Issue invites and assign server roles to customers and active subscribers.
  </Card>
</CardGroup>

Need something off this list? Reach for a **custom benefit**, and watch this space — more built-in types are landing over time.

<Tip>
  Building an AI product, API, or autonomous agent? Pair a **Prepaid Credits** benefit with a [usage meter](/features/usage-based-billing/introduction) so each plan grants a balance that draws down as the customer consumes tokens, calls, or agent runs. That pairing is the foundation for [metered AI and agent-outcome billing](/features/usage-based-billing/introduction).
</Tip>

## Define once, reuse everywhere

The thing that makes benefits manageable at scale is that each one is a **standalone resource** — not a blob of config copied into every product. You attach the same benefit to one product or to fifty.

| Benefit as a shared resource              | Entitlement copied per product        |
| ----------------------------------------- | ------------------------------------- |
| Define once, attach to many products      | Re-enter the same config every time   |
| Edit in one place — it updates everywhere | Track down and patch every copy       |
| One source of truth, no drift             | Duplicate data that silently diverges |
| Clean to manage, clean for customers      | Cluttered and error-prone             |

**Concrete example.** You sell a developer tool through three SKUs: `Indie Monthly`, `Team Annual`, and a `Lifetime` license. A single "Insiders Discord role" benefit attaches to all three. Rename the role or swap the server, and every plan picks up the change at once — no per-product edits.

## Who has access at any moment

Macropay derives entitlements from the customer's *current* standing, so the access list is always correct without sweeping for stale grants.

| Customer state                                   | Access?                                              |
| ------------------------------------------------ | ---------------------------------------------------- |
| Active subscriber on a tier carrying the benefit | <Icon icon="check" color="#16a34a" /> Yes            |
| Bought a one-time product carrying the benefit   | <Icon icon="check" color="#16a34a" /> Yes — for life |
| Subscription cancelled, expired, or refunded     | <Icon icon="xmark" color="#dc2626" /> No             |
| Never purchased                                  | <Icon icon="xmark" color="#dc2626" /> No             |

<Note>
  One-time purchases grant **lifetime** access to their benefits. Subscription benefits live and die with the subscription — when it lapses, the associated access (repo invite, Discord role, license key) is pulled automatically.
</Note>

## Two ways to set one up

<Steps>
  <Step title="Inline, while building a product">
    Add a benefit directly in the product form as you create or edit an offering — handy when you're standing up a new plan and want everything in one pass.
  </Step>

  <Step title="From the Benefits dashboard">
    Manage every benefit in one place under **Benefits**, then attach existing ones to any product or tier. Best when a single entitlement spans several plans.
  </Step>
</Steps>

Once a benefit is attached, fulfillment runs itself for every future purchase, renewal, and cancellation. You stop shipping access by hand — Macropay grants and revokes it for you.
