Skip to content
Back to skills

Bondery Payments

ASecurity

Bondery Stripe Billing integration — embedded Checkout, webhook mirror, entitlements, trial-ending email, and env configuration. Use when changing subscriptions, checkout, billing webhooks, premium access, or Stripe Dashboard setup.

  • 41 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 24, 2026
databasesgoapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned November 24, 2026

npx -y skills add usebondery/bondery --skill bondery-payments --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bondery Payments?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bondery Payments
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/usebondery-bondery-payments/badge)](https://www.skillsdirectory.com/skills/usebondery-bondery-payments)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bondery-payments
description: >
  Bondery Stripe Billing integration — embedded Checkout, webhook mirror, entitlements,
  trial-ending email, and env configuration. Use when changing subscriptions, checkout,
  billing webhooks, premium access, or Stripe Dashboard setup.
metadata:
  version: "1.0.0"
  namespace: bondery
---

# Bondery Payments (Stripe Billing)

## When to use

- Changing subscription routes, checkout, portal, or sync
- Handling Stripe webhooks or mirror table updates
- Premium access / payment failure grace logic
- Trial-ending email or billing env vars
- Migrating or reviewing billing architecture

## Non-negotiables

1. **Stripe is source of truth** — Price IDs in env; `subscriptions` is a webhook mirror.
2. **Custom Fastify integration** — not Better Auth Stripe plugin (see ADR 0002).
3. **Webhooks at `POST /webhooks/stripe` on the API host** (`https://api.usebondery.com/webhooks/stripe`) — raw body + `constructEvent` + idempotency table. Not the webapp `/api` BFF prefix.
4. **`GET /api/subscriptions` is DB-only** — no live Stripe API calls on read.
5. **Embedded Checkout** — `ui_mode: embedded`, return `clientSecret`, `@stripe/stripe-js`.
6. **Upgrades gated** — `BONDERY_PUBLIC_BILLING_UPGRADES_ENABLED=false` by default.

## Decision tree

| Task                                 | Read                                                                                                                                                 |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Architecture & ADR                   | [references/architecture.md](references/architecture.md)                                                                                             |
| Webhook events                       | [references/webhook-events.md](references/webhook-events.md)                                                                                         |
| Stripe product model                 | [references/stripe-product-model.md](references/stripe-product-model.md)                                                                             |
| Access control                       | [references/access-control.md](references/access-control.md)                                                                                         |
| Env vars / local Stripe CLI          | [references/env-vars.md](references/env-vars.md)                                                                                                     |
| API routes                           | [references/api-routes.md](references/api-routes.md)                                                                                                 |
| Webapp checkout                      | [references/client-integration.md](references/client-integration.md)                                                                                 |
| Trial-ending email (billing trigger) | [references/trial-ending-email.md](references/trial-ending-email.md) — template/delivery → [bondery-emails](../bondery-emails/references/catalog.md) |

## Pre-ship checklist

- [ ] Webhook handler idempotent (`stripe_webhook_events`)
- [ ] `mapStripeStatus` and `hasPremiumAccess` consistent with webhook writes
- [ ] Checkout: `allow_promotion_codes`, 15-day trial, `metadata.bondery_user_id`
- [ ] No Polar references remain (`rg -i polar`)
- [ ] OpenAPI + schema package updated
- [ ] Legal subprocessor registry lists Stripe (not Polar)

Files in this skill

  • SKILL.md3.5 KB
  • references/README.md1.1 KB
  • references/access-control.md570 B
  • references/api-routes.md1.1 KB
  • references/architecture.md489 B
  • references/client-integration.md467 B
  • references/env-vars.md2.3 KB
  • references/stripe-product-model.md472 B
  • references/trial-ending-email.md407 B
  • references/webhook-events.md1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in databases →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.