polar-billing
This skill should be used when working on Polar billing system, Stripe integration, subscription lifecycle, checkout flows, or benefit provisioning.
Profile →npx skills add fcakyon/claude-codex-settings --skill polar-billing --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Guides an agent to operate on Polar's billing infrastructure, covering Stripe integration, checkout flows, subscriptions, proration, and benefits provisioning. It outlines entities, relationships, services, background tasks, and Stripe interactions.
How it works
- Describes core entities: Checkout, CheckoutLink, Order, Subscription, Transaction, Payment, Refund, Customer, Product & ProductPrice, BillingEntry.
- Details relationships among Organization, Product, Customer, Subscription, Order, Payment, Discount, and Account depending on ledger flows.
- Lists Main Services with concrete functions and signatures:
- SubscriptionService: create_or_update_from_checkout(checkout, payment_method), update_product(...), update_seats(...), update_discount(...), update_trial(...), cycle(...), cancel(...), revoke(...), uncancel(...), enqueue_benefits_grants(...).
- OrderService: create_from_checkout(checkout), create_subscription_order(subscription, billing_reason), trigger_payment(order), create_order_balance(order).
- CheckoutService: create(product, customer_data, discount_code), confirm(checkout), handle_stripe_success(checkout, charge), handle_free_success(checkout).
- PaymentService: upsert_from_stripe_charge(charge, checkout, order), handle_success(payment), handle_failure(payment).
- RefundService: create(order, amount, reason, revoke_benefits), upsert_from_stripe(stripe_refund).
- BenefitGrantService: enqueue_benefits_grants(task, customer, product, order=None, subscription=None), grant_benefit(customer, benefit), revoke_benefit(customer, benefit).
- Outlines Dramatiq background tasks across Subscription, Order, Stripe Webhook, Benefit, Checkout, Payout, Refund with specific task names and triggers.
- Details Stripe integration including webhook endpoints, implemented events, and a processing flow from Stripe to external events, storage, and asynchronous processing.
- Enumerates StripeService key methods: create_payment_intent(), create_setup_intent(), create_refund(), get_refund(), create_tax_calculation(), create_tax_transaction(), transfer(), create_payout().
- Provides Subscription lifecycle flows: Creation, Cycle/Renewal, Cancellation, Trial, including statuses and actions like benefit grants, email, and ledger entries.
- Covers Proration System: triggers when product changes or seat changes.
When to use it
Use when working on Polar billing system, Stripe integration, subscription lifecycle, checkout flows, or benefit provisioning.
What it can touch
- Functions and classes referenced under server/polar/... including models (Checkout, CheckoutLink, Order, Subscription, Transaction, Payment, Refund, Customer), services (subscription, order, checkout, payment, refund, benefit), and Stripe integration modules.
- Background tasks and Stripe webhook handlers as described (Dramatiq tasks and Stripe endpoints).
Caveats
- License: Apache-2.0.
- Describes procedural steps and concrete function signatures as explicit in the skill, with no extrapolated outcomes beyond listed flows.
# 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 1. [Core Entities](#1-core-entities) 2. [Entity Relationships](#2-entity-relationships) 3. [Main Services](#3-main-services) 4. [Dramatiq Background Tasks](#4-dramatiq-background-tasks) 5. [Stripe Integration](#5-stripe-integration) 6. [Subscription Lifecycle](#6-subscription-lifecycle) 7. [Proration System](#7-proration-system) 8. [Benefits & Credits](#8-benefits--credits) 9. [Dunning & Payment Retry](#9-dunning--payment-retry) 10. [Transaction Ledger](#10-transaction-ledger) 11. [Key File Locations](#11-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`
- Quick Reference
- Table of Contents
- 1. Core Entities
- Checkout
- CheckoutLink
- Order
- Subscription
- Transaction
- Payment
- Refund
- Customer
- Product & ProductPrice
- BillingEntry
- 2. Entity Relationships
What does the polar-billing skill do?
This skill should be used when working on Polar billing system, Stripe integration, subscription lifecycle, checkout flows, or benefit provisioning.
How do I install it?
Run `npx skills add fcakyon/claude-codex-settings --skill polar-billing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From fcakyon/claude-codex-settings, a repository with 967 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.