polar-billing
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when working on Polar billing system, Stripe integration, subscription lifecycle, checkout flows, or benefit provisioning.
от fcakyon★ 1 223 звезды на GitHubОб этом скилле
Polar Billing System
Comprehensive guide to Polar's billing infrastructure, covering entities, flows, Stripe integration, and benefit provisioning.
Quick Reference
Checkout → Payment → Order → Transaction → Benefits
↓
Subscription (if recurring)
↓
Subscription Cycle → Order → ...
Table of Contents
- Core Entities
- Entity Relationships
- Main Services
- Dramatiq Background Tasks
- Stripe Integration
- Subscription Lifecycle
- Proration System
- Benefits & Credits
- Dunning & Payment Retry
- Transaction Ledger
- Key File Locations
1. Core Entities
Checkout
File: server/polar/models/checkout.py
Shopping cart/payment session before order confirmation.
| Field | Type | Description |
|---|---|---|
status |
CheckoutStatus | open, expired, confirmed, succeeded, failed |
payment_processor |
PaymentProcessor | stripe, manual |
client_secret |
str | Unique identifier for frontend |
amount, currency |
int, str | Price in cents |
tax_amount, discount_amount |
int | Calculated amounts |
allow_trial, trial_end |
bool, datetime | Trial configuration |
seats |
int | For seat-based products |
Relationships: organization, customer, product, product_price, discount, subscription (for upgrades)
CheckoutLink
File: server/polar/models/checkout_link.py
Persistent URL that creates Checkout Sessions on visit.
| Field | Type | Description |
|---|---|---|
client_secret |
str | Unique identifier for the URL |
seats |
int | None | Preconfigured seat count for seat-based pricing |
discount_id |
UUID | None | Preset discount to apply |
trial_interval, trial_interval_count |
Trial config | Override product trial settings |
Relationships: organization, products, discount
Order
File: server/polar/models/order.py
Represents a billing event (one-time purchase or subscription cycle).
| Field | Type | Description |
|---|---|---|
status |
OrderStatus | pending, paid, refunded, partially_refunded |
billing_reason |
OrderBillingReason | purchase, subscription_create, subscription_cycle, subscription_update |
subtotal_amount |
int | Amount before discount/tax |
discount_amount |
int | Discount applied |
tax_amount |
int | Tax collected |
applied_balance_amount |
int | Account balance applied |
platform_fee_amount |
int | Polar's fee |
refunded_amount |
int | Already refunded |
next_payment_attempt_at |
datetime | Dunning retry time |
Computed Properties:
net_amount= subtotal - discounttotal_amount= net + taxdue_amount= max(0, total + applied_balance)payout_amount= net - platform_fee - refunded
Subscription
File: server/polar/models/subscription.py
Recurring billing relationship.
| Field | Type | Description |
|---|---|---|
status |
SubscriptionStatus | incomplete, trialing, active, past_due, canceled, unpaid |
amount, currency |
int, str | Subscription gross price |
net_amount |
int | Net amount (gross minus inclusive tax, equal to gross if tax-exclusive) |
tax_behavior |
TaxBehavior | None | Inclusive, exclusive, or null (set at creation) |
recurring_interval |
Interval | month, year |
current_period_start/end |
datetime | Billing period |
trial_start/end |
datetime | Trial period |
cancel_at_period_end |
bool | Scheduled cancellation |
canceled_at, ended_at |
datetime | Lifecycle timestamps |
past_due_at |
datetime | When payment failed |
seats |
int | For seat-based pricing |
Relationships: organization, customer, product, payment_method, discount, meters, grants (benefits)
Transaction
File: server/polar/models/transaction.py
All money flows in the system.
| Field | Type | Description |
|---|---|---|
type |
TransactionType | payment, processor_fee, refund, dispute, balance, payout |
processor |
Processor | stripe, manual |
amount, currency |
int, str | Transaction amount |
tax_amount |
int | Tax portion |
Self-referential relationships: payment_transaction, balance_transactions, incurred_transactions
Payment
File: server/polar/models/payment.py
Individual payment transaction.
| Field | Type | Description |
|---|---|---|
status |
PaymentStatus | pending, succeeded, failed |
processor_id |
str | Stripe charge ID |
method |
str | card, bank_transfer, etc. |
trigger |
PaymentTrigger | None | What initiated payment: purchase, s |
Установить polar-billing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл polar-billing?
This skill should be used when working on Polar billing system, Stripe integration, subscription lifecycle, checkout flows, or benefit provisioning.
Как установить скилл polar-billing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл polar-billing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic