How would you architect an e-commerce build for a longevity clinic given the following requirements?
Some SKUs require a prescription (including injectables), others are OTC, plus memberships and subscription packages.
The critical requirement is medical review prior to final payment capture for Rx-required SKUs.
High-level flow:
- Customer places an order.
- If the cart contains any Rx-required SKU, we must authorize the payment but not capture it.
- A medical-risk assessment (rules-based binary decision model) runs using clinic-supplied thresholds and patient context.
Outcomes:
- Approved: capture payment and fulfill.
- More action required: hold authorization, trigger telehealth consult scheduling within 7 days, clinician manually approves or denies, then capture or void/refund.
Architecture pathways
- Custom or headless commerce with a middleware orchestration service (order state machine, rules engine, integrations).
- WooCommerce (self-hosted) with custom plugins for Rx gating, rules engine integration, and EMR sync.
- Split model: non-Rx storefront plus Rx enrollment portal (eligibility first, then charge), to reduce commerce platform policy risk.
- An alternative architecture pathway not yet considered?
Which architecture is most robust for authorize-only then capture after clinical approval, especially with telehealth escalation and manual overrides?
Top comments (0)