Skip to main content

Documentation Index

Fetch the complete documentation index at: https://grantmaster.dev/llms.txt

Use this file to discover all available pages before exploring further.

Integration Guide: Stripe Billing

Overview

GrantMaster uses Stripe for subscription management, AI credit purchases, and payment processing. Stripe handles all financial transactions — GrantMaster never stores payment card details directly.

What It Does

FeatureDescription
Subscription managementMonthly/annual plan billing with automatic renewal
AI credit purchasesOne-time and recurring credit pack purchases
Customer portalSelf-service portal for updating payment methods and viewing invoices
Invoice managementAutomatic invoice generation and delivery
Webhook eventsReal-time subscription status updates to GrantMaster

For Admins: Managing Your Subscription

Viewing Your Plan

  1. Go to Settings > Billing
  2. View your current plan, billing cycle, and next payment date
  3. See your AI credit balance and usage history

Changing Your Plan

  1. Go to Settings > Billing > Manage Plan
  2. You will be redirected to the Stripe Customer Portal
  3. Select a new plan tier
  4. Changes take effect at the start of the next billing cycle (for downgrades) or immediately (for upgrades)

Updating Payment Method

  1. Go to Settings > Billing > Payment Method
  2. Click Update — you are redirected to the Stripe Customer Portal
  3. Add a new card or update the existing one
  4. GrantMaster does not see or store your card details — Stripe handles this securely

Purchasing AI Credits

  1. Go to Settings > Billing > AI Credits
  2. Select a credit pack (amounts vary by subscription tier)
  3. Click Purchase — the charge is processed via Stripe
  4. Credits are added to your organization’s balance immediately

Viewing Invoices

  1. Go to Settings > Billing > Invoices
  2. View all past invoices with amounts, dates, and status
  3. Click any invoice to download a PDF copy
  4. Invoices are also emailed to the billing contact automatically

How It Works (Technical)

Subscription Lifecycle

Customer signs up → Stripe creates subscription → Webhook notifies GrantMaster
→ GrantMaster activates features for the selected tier
→ Stripe auto-charges on billing cycle → Webhook confirms payment
→ If payment fails → Grace period → Downgrade to free tier

Webhook Events

GrantMaster listens for these Stripe events:
EventAction in GrantMaster
checkout.session.completedActivate subscription, provision features
invoice.paidConfirm active status, record payment
invoice.payment_failedSend warning notification to Admin
customer.subscription.updatedUpdate plan tier and feature access
customer.subscription.deletedDowngrade to free tier

Credit Transactions

Credit purchases are tracked in GrantMaster’s creditTransactions collection:
  • Purchase: Credits added to organization balance
  • Consumption: Credits deducted per AI feature usage (chat, agents, OCR)
  • Reservation: Credits held during agent execution, released if unused

Troubleshooting

Payment Failed

SymptomPossible CauseSolution
”Payment failed” notificationCard expired or declinedUpdate payment method via Settings > Billing
Features disabledSubscription lapsed after failed paymentUpdate payment method; features restore after successful charge
Invoice shows “Past Due”Payment retry pendingStripe retries automatically; update card to resolve faster

Subscription Not Reflecting

SymptomPossible CauseSolution
Plan shows wrong tierWebhook delivery delayedWait a few minutes; if persistent, contact support
Credits not appearingPurchase webhook not processedRefresh the page; if missing after 5 minutes, contact support
Features locked after upgradeBrowser cacheHard refresh (Ctrl+Shift+R) or log out and back in

Cannot Access Customer Portal

  • Ensure you are logged in as an Admin — only Admins can access billing
  • If the portal link fails, try clearing your browser cache
  • The Stripe Customer Portal requires cookies to be enabled

Best Practices

  • Keep payment methods current — expired cards cause service interruptions
  • Set up a billing contact email that is monitored — invoice and failure notifications go there
  • Monitor AI credit balance — set alerts at 20% remaining in Settings > Billing > AI Credits
  • Review invoices monthly — ensure charges match your expected plan and credit usage
  • Use annual billing if your budget allows — it typically offers a discount vs. monthly

Limitations

  • GrantMaster does not store any payment card information — all payment data is managed by Stripe
  • Refunds must be requested through GrantMaster support — they cannot be self-served via the portal
  • Plan downgrades take effect at the end of the current billing cycle — no partial-month refunds
  • AI credits are non-refundable once purchased; unused credits do not expire
  • Currency is determined at subscription creation and cannot be changed without creating a new subscription