stripe-synclisted
Install: claude install-skill iansteitz1-eng/aria-skills
# stripe-sync
YAML-as-source-of-truth for Stripe products and prices. Reconciles to the live account, returns the resolved price IDs, and (optionally) writes them straight into `.env`.
## When to use
- Initial product setup at launch (replaces clicking through N dashboard forms)
- Price changes (a new price gets created; old one stays for existing subscriptions, per Stripe's price immutability)
- New product launches (add a `sku:` block in YAML, run once)
- Catalog audits (`--dry-run` shows the diff between YAML and live)
## How it works
1. Reads `stripe_products.yaml`
2. For each product: matches by `metadata.aria_sku` (the `sku:` field). Creates if absent; updates name/description if drifted.
3. For each price under the product: matches by (product, unit_amount, currency, recurring.interval). Creates if absent. **Never modifies existing prices** — Stripe prices are immutable.
4. Returns a `{env_var: price_id}` map.
5. Optionally writes the map into `.env` (`--write-env`).
## Steps
1. **Edit `stripe_products.yaml`** to declare your products + prices.
2. **Dry-run** to see what would happen:
```sh
python3 stripe_sync.py
```
3. **Apply against test mode**:
```sh
python3 stripe_sync.py --apply
```
4. **Apply against production**:
```sh
# Edit YAML: mode: live
python3 stripe_sync.py --apply --prod
```
5. **Merge resolved IDs into .env** in one shot:
```sh
python3 stripe_sync.py --apply --prod --write-env
```
## Env vars required
|