Stripe Metadata Strategy

Document what PayPress stores in Stripe metadata and why.

Purpose

Document what PayPress stores in Stripe metadata and why.

Overview

PayPress uses Stripe metadata to connect Stripe objects back to the local WordPress plan, installation, payment type, user context, and checkout context.

How It Works

Checkout creation attaches safe metadata to Stripe-supported objects. For Payment Forms, Stripe metadata receives reference IDs such as form submission ID, form ID, and form revision, but not raw customer response values.

Important Components

  • installation_uuid.
  • origin_site_url.
  • site_url.
  • local_plan_id.
  • wp_user_id.
  • payment_type.
  • form_submission_id.
  • form_id.
  • form_revision.
  • Stripe Checkout Session metadata.
  • PaymentIntent metadata.
  • Subscription metadata where supported.

Data Flow

PayPress checkout validation -> context persisted -> safe metadata added to Stripe objects -> webhook returns metadata -> ownership and local context resolution.

Security Considerations

Metadata should not contain secrets, raw form responses, private notes beyond intended references, API keys, or sensitive payment information.

Known Limitations

Stripe metadata propagation varies by object type. Some legacy or manually created Stripe objects may lack PayPress metadata and require fallback handling.

Related Articles