Payment Forms Data Model

Explain how PayPress stores form definitions and order response snapshots.

Purpose

Explain how PayPress stores form definitions and order response snapshots.

Overview

Payment Forms are plan-level versioned JSON definitions. Customer responses are validated, stored in checkout context, then copied as immutable snapshots to orders.

How It Works

Each plan can have one Payment Form definition with stable field IDs and option IDs. Submitted responses are validated against the current definition before checkout. Raw response values are stored locally, not in Stripe metadata.

Important Components

  • Plan-level form definition JSON.
  • Stable field UUIDs.
  • Stable option UUIDs.
  • Reserved visibility object.
  • Checkout context table.
  • Order form_submission snapshot.
  • Order Details Form Responses.
  • CSV raw JSON export.

Data Flow

Plan form definition -> front-end form -> server validation -> checkout context persistence -> Stripe metadata references only -> webhook order creation -> order snapshot.

Security Considerations

PayPress never sends raw form response values to Stripe metadata. Submitted values are sanitized and validated server-side.

Known Limitations

Conditional logic, reusable forms, file uploads, calculations, date fields, date/time fields, address fields, and advanced styling builder are deferred.

Related Articles