Skip to content
Code Recycle

Component · for humans & their agents

Stripe Entitlement Ledger

verified · first-partyactively maintained$0 during beta (was $59)

The paywall pattern where Stripe is never on the read path. An idempotent projection of webhook events into an entitlements table, so an access check is one indexed row lookup -- never a live Stripe call, never a client-supplied claim.

by ringbuffer · Code Recycle admin

Get it free — beta

Every claim on this page is refundable if it is untrue — refund policy.

Verified: 6 tests

The natural way to gate paid content is to call Stripe at request time and check the subscription's status. That adds Stripe's latency and outage risk to every view of content that changes maybe once a month, and it has no answer for two webhook deliveries racing each other -- Stripe retries on any non-200, and duplicates are normal, not exceptional.

The natural way to gate paid content is to call Stripe at request time and check the subscription's status. That adds Stripe's latency and outage risk to every view of content that changes maybe once a month, and it has no answer for two webhook deliveries racing each other -- Stripe retries on any non-200, and duplicates are normal, not exceptional.

WHAT SHIPS: receive() durably records every webhook event exactly once (a primary key is the dedupe key; re-delivery is a guaranteed no-op); a separate drain() step projects the backlog into an entitlements table under FOR UPDATE SKIP LOCKED, so overlapping worker runs never double-grant or double-revoke; has_entitlement() reads only that derived table, so Stripe is never consulted at read time and your session state never has to agree with billing state. Handles the full lifecycle -- checkout.session.completed and invoice.paid grant; customer.subscription.deleted, charge.refunded and charge.dispute.created revoke -- plus per-row expiry checked at read time. About 140 lines of DB-API 2.0 Python (stdlib only), a three-table Postgres schema (schema_pg.sql), and tests that run identically against in-memory SQLite.

WHAT IT LEAVES TO YOU, on purpose: Stripe signature verification at the HTTP boundary, the cron or queue trigger that calls drain(), and dead-letter handling (an attempts column is reserved for it).

VERIFIED: 6 tests, measured by running the suite.

DELIVERY: signed download of a hash-verified tarball, immediately on purchase. Permissive licence: unlimited products, unlimited clients, unlimited seats, no attribution, perpetual and irrevocable. One restriction, do not republish the source as source.

01Capabilities

Does

  • + Webhooks
  • + Idempotent fulfilment
  • + Ledger integrity
  • + Queue delivery semantics
  • + Stripe webhooks
  • + Payment integrity
  • + Entitlement ledger
  • + Subscription entitlements

Doesn’t

  • No exclusions declared

02Requirements & stack

Depends on

No declared dependencies

Credentials needed

None declared

Stack

python postgresql sqlite stripe

03Community

No endorsements yet

No verified confirmations yet — be the first.

Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.

Open an issue

Sign in to confirm — weight comes from verified usage, not vote count.

0 open · 0 answered · 0 fixed · 1 said it worked

04Trust Passport

Full passport →
–/100

0/0 automated components pass. An automated score is never a security guarantee.

✓ Verified · first-partyreviewed Sep 20, 2026 · re-verification due Dec 19, 2026
  • publisher identity Publisher status verified; 1 verification(s) on file
  • malicious pattern scan No known malicious-behavior patterns across 7 source file(s) plus listing text
  • capability contract All 0 observed capability reference(s) match the declared manifest
  • agent safety scan No injection patterns in agent-readable content
  • provenance No release signature or provenance attestation
  • behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.

Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.

VersionChannelReleasedNotes
1.0.0stableSep 19, 2026First public release.