Subscription Data Model

Describe the local PayPress subscription record.

Purpose

Describe the local PayPress subscription record.

Overview

Subscription records mirror key Stripe subscription state for merchant visibility in WordPress. They are not a replacement subscription engine.

How It Works

PayPress upserts subscription records from Stripe subscription and invoice events. The local record stores the Stripe customer, subscription, price, WordPress user when known, status, current period end, cancel-at-period-end state, and timestamps.

Important Components

  • Subscriptions table.
  • Stripe customer ID.
  • Stripe subscription ID.
  • Stripe price ID.
  • WordPress user ID.
  • Status.
  • Current period end.
  • Cancel-at-period-end flag.
  • Last event ID.

Data Flow

Subscription checkout or Stripe subscription event -> ownership validation -> local subscription upsert -> subscription table/admin display -> related orders from invoice events.

Security Considerations

Subscription updates require valid Stripe webhook signatures and ownership acceptance. Portal and cancellation actions rely on Stripe as the source of truth.

Known Limitations

PayPress does not currently persist full pause collection details as a first-class subscription state. Dedicated pause visibility is deferred.

Related Articles