Skip to content

Stripe integration: due diligence, modernization arc, and tracking #1142

@rdhyee

Description

@rdhyee

Purpose

Umbrella tracking issue for the Stripe integration in regluit:

  • Capture the current state and architecture
  • Track the open due-diligence questions raised at the 2026-04-16 and 2026-04-30 Eric meetings
  • Track the long-term modernization arc (API version, PaymentIntent, webhook signing)
  • Provide a single place to link related issues and PRs

This is not a single-deliverable issue. It will stay open across the Django 4.2 migration (PR #1123) and beyond.

Knowledge map (living): kept in Raymond's notes; this issue is the public anchor.

Context

Eric flagged at the 2026-04-30 meeting that Stripe DD is the named gate for the Django 4.2 migration ship. Doing the DD revealed that we don't have a single place that documents how Stripe is wired into regluit, what's on the modernization arc, or what's known to be broken (#1125). This issue fills that gap.

Architecture, in one paragraph

regluit's `payment/` app abstracts payment processors via `baseprocessor.py`. Today only `stripelib.Processor` is live (PayPal Adaptive and Amazon Payments are vestigial). The `Transaction` model in `payment/models.py` is the canonical record (with `host='stripelib'` for modern rows); `PaymentResponse` is the raw audit log; `Account` links a regluit user to a Stripe Customer. `manager.py` handles transaction lifecycle and dispatches to `stripelib.py`, which calls the Stripe API. `views.py` hosts the webhook receiver and donation endpoints. Three campaign types (REWARDS, B2U, THANKS) interact with Stripe differently; THANKS is by far the dominant active flow.

Yellow flags (known)

  • Stripe API version pinned to `2013-02-13` in `stripelib.py`. Stripe is backwards-compat-friendly but this is 12 years old. Modernization to `PaymentIntent` / `PaymentMethod` is a bounded project, not a Django 4.2 prerequisite.
  • Webhook signature not verified. The `stripe_webhook` view doesn't validate `Stripe-Signature`. Bounded risk based on what we do with events, but should be fixed.
  • Anonymous Stripe Customer for logged-in donors — see Logged-in donations create anonymous Stripe Customer due to token-presence check #1125.
  • `Receiver` table is dead — vestige of PayPal Adaptive Payments era. Dead code complicates the payment paths.

Due-diligence checklist (Phase B of #1123)

  • B.1 — Quantify completed Stripe charge volume over the last 24 months on prod
  • B.2 — Test-mode end-to-end on dj42 (save card with `4242`, charge $1, verify in Stripe dashboard, confirm `Account` and `Transaction` rows correct)
  • B.3 — Decide Logged-in donations create anonymous Stripe Customer due to token-presence check #1125 fix in-scope for Upgrade Django 1.11 → 4.2 LTS #1123 vs follow-up
  • Confirm dj42 settings point at Stripe test keys, not prod
  • Confirm `stripe` Python library version on the Django 4.2 branch (and what changed between current and that)
  • Verify the `2013-02-13` API version still works as expected in 2026 (it should — Stripe doesn't deprecate — but worth a sanity check via the dashboard)

Modernization arc (post-#1123)

These are not migration prerequisites. Listed in rough priority:

  1. Webhook signature verification (security; small)
  2. Fix Logged-in donations create anonymous Stripe Customer due to token-presence check #1125 (correctness; small if not folded into Upgrade Django 1.11 → 4.2 LTS #1123)
  3. Strip `Receiver` and PayPal/Amazon vestiges (clarity; medium)
  4. API version upgrade to a modern version (forward-compat; medium-large, requires `PaymentIntent` flow)
  5. Webhook idempotency review (correctness)

Children / linked issues

(Will be expanded as DD surfaces things.)

What this issue is NOT

  • Not a deliverable issue. Don't expect to "close" this.
  • Not a replacement for focused issues — those still get filed separately and linked here.
  • Not a Django 4.2 blocker on its own. The DD checklist is the blocker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions