feat(admin): port a8n-tools Stripe setup docs + Products and Prices into the Stripe panel (BUNYIP-416) #414

Merged
longjacksonle merged 1 commit from feat/BUNYIP-416-stripe-products-prices-docs into main 2026-07-30 04:19:16 +02:00

What

Closes BUNYIP-416. Ports the a8n-tools Stripe admin surface - setup documentation plus Products and Prices management - into the bunyip Stripe admin panel. Webhooks are intentionally omitted (per David).

Key finding: bunyip-api already exposes the product/price endpoints (GET/POST /admin/stripe/products, PUT/DELETE .../{id}, GET/POST /admin/stripe/prices, DELETE .../{id}) and the StripeService methods behind them. So this is a bunyip-web UI port onto existing APIs, not new backend work.

Added

  • Setup docs ("Setting up Stripe" card): where/how to create a restricted API key, the required Write/Read permissions, the rk_(live|test)_… format, app-tag scoping, and that a lifetime plan is a $0.00 price. Ported from a8n-tools' API Keys tab.
  • Products section: create (name + optional description) and archive; lists app-tagged products with Active/Archived badges. Archive is shown only for active products.
  • Prices section: create (product dropdown of active products; amount in dollars with 0 allowed for a lifetime plan; currency; monthly/yearly interval) and archive. No edit (Stripe prices are immutable). A $0 price renders as $0.00, not --.
  • New BFF calls + web POST handlers/routes, following the existing form-POST-then-redirect + toast pattern. dollars->cents parsing allows 0, rejects negatives / non-numbers.
  • Reuses the BUNYIP-415 admin_block / admin_block_grid two-column layout for the config; Products and Prices are full-width blocks below.

An unconfigured / invalid API key surfaces as a graceful "could not load" note, not a hard failure.

Tests

format_stripe_amount ($0.00 vs --, currency symbols), parse_price_cents (0 allowed; negatives/junk rejected), and the Products/Prices section renderers (listing, active-only archive gating, zero-price display, product-name resolution, load-error state). just check-container green.

AC5 note: live product/price listing against a Stripe test account is covered by the bunyip-api integration tests behind these endpoints; this PR is the UI port that calls them. Running the web layer end-to-end needs a Stripe test key (not available here), so the rendered UI - setup docs, config, Products/Prices sections + create forms - was verified via screenshot in the unconfigured "could not load" state (shared in-thread).

Reference

Ported from a8n-tools/frontend/src/pages/admin/AdminStripePage.tsx (API Keys / Products / Prices tabs).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LerAorB26HGHLfjC9iDUbd

## What Closes BUNYIP-416. Ports the a8n-tools Stripe admin surface - setup documentation plus Products and Prices management - into the bunyip Stripe admin panel. Webhooks are intentionally omitted (per David). Key finding: bunyip-api **already exposes** the product/price endpoints (`GET/POST /admin/stripe/products`, `PUT/DELETE .../{id}`, `GET/POST /admin/stripe/prices`, `DELETE .../{id}`) and the `StripeService` methods behind them. So this is a bunyip-web UI port onto existing APIs, not new backend work. ## Added - **Setup docs** ("Setting up Stripe" card): where/how to create a restricted API key, the required Write/Read permissions, the `rk_(live|test)_…` format, app-tag scoping, and that a lifetime plan is a $0.00 price. Ported from a8n-tools' API Keys tab. - **Products** section: create (name + optional description) and archive; lists app-tagged products with Active/Archived badges. Archive is shown only for active products. - **Prices** section: create (product dropdown of active products; amount in dollars with **0 allowed** for a lifetime plan; currency; monthly/yearly interval) and archive. No edit (Stripe prices are immutable). A $0 price renders as `$0.00`, not `--`. - New BFF calls + web POST handlers/routes, following the existing form-POST-then-redirect + toast pattern. dollars->cents parsing allows `0`, rejects negatives / non-numbers. - Reuses the BUNYIP-415 `admin_block` / `admin_block_grid` two-column layout for the config; Products and Prices are full-width blocks below. An unconfigured / invalid API key surfaces as a graceful "could not load" note, not a hard failure. ## Tests `format_stripe_amount` ($0.00 vs `--`, currency symbols), `parse_price_cents` (0 allowed; negatives/junk rejected), and the Products/Prices section renderers (listing, active-only archive gating, zero-price display, product-name resolution, load-error state). `just check-container` green. **AC5 note:** live product/price listing against a Stripe test account is covered by the bunyip-api integration tests behind these endpoints; this PR is the UI port that calls them. Running the web layer end-to-end needs a Stripe test key (not available here), so the rendered UI - setup docs, config, Products/Prices sections + create forms - was verified via screenshot in the unconfigured "could not load" state (shared in-thread). ## Reference Ported from `a8n-tools/frontend/src/pages/admin/AdminStripePage.tsx` (API Keys / Products / Prices tabs). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LerAorB26HGHLfjC9iDUbd
feat(admin): port a8n-tools Stripe setup docs + Products and Prices into the Stripe panel (BUNYIP-416)
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 56s
Check / fmt + clippy + build + tests (pull_request) Successful in 4m5s
Create release / Create release from merged PR (pull_request) Has been skipped
3fc00d12b1
The bunyip Stripe admin panel only had the config form. bunyip-api already exposes the full product/price management endpoints (GET/POST /admin/stripe/products, PUT/DELETE .../{id}, GET/POST /admin/stripe/prices, DELETE .../{id}); this wires the bunyip-web UI onto them and ports the setup guidance from the a8n-tools Stripe admin page.

Added:
- Setup documentation card ("Setting up Stripe"): how and where to create a restricted API key, the required Write/Read permissions, the rk_(live|test) format, the app-tag scoping, and that a lifetime plan is a $0.00 price. Ported from a8n-tools' API Keys tab.
- Products section: create (name + optional description) and archive, listing app-tagged products with Active/Archived status. Archive shown only for active products.
- Prices section: create (product dropdown of active products, amount in dollars with 0 allowed for a lifetime plan, currency, monthly/yearly interval) and archive. Prices are immutable in Stripe so there is no edit. A $0 price renders as "$0.00", not "--".
- New BFF calls (list/create/archive product + price) and web POST handlers + routes, following the existing form-POST-then-redirect pattern with toast confirmations. dollars->cents parsing allows 0 and rejects negatives / non-numbers.
- Reuses the BUNYIP-415 admin_block / admin_block_grid two-column layout for the config; Products and Prices are full-width blocks below.

Webhooks are intentionally omitted (David: not needed). An unconfigured / invalid API key surfaces as a graceful "could not load" note rather than a hard failure.

Tests (bunyip-web): format_stripe_amount ($0.00 vs --, currency symbols), parse_price_cents (0 allowed, negatives/junk rejected), and the products/prices section renderers (listing, active-only archive gating, zero-price display, product-name resolution, load-error state). just check-container green.

Note on AC5: live product/price listing against a Stripe test account is exercised by the bunyip-api integration tests behind these endpoints (this change is a UI port that calls them); running the web layer end-to-end needs a Stripe test key, which is not available in this environment - verified the rendered UI (setup docs, config, Products/Prices sections + create forms) via screenshot with the unconfigured "could not load" state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LerAorB26HGHLfjC9iDUbd
longjacksonle scheduled this pull request to auto merge when all checks succeed 2026-07-30 04:15:43 +02:00
longjacksonle deleted branch feat/BUNYIP-416-stripe-products-prices-docs 2026-07-30 04:19:17 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!414
No description provided.