--- id: ADAPTIVE-WP-0007 type: workplan title: "Provider abstraction and Stripe publication" domain: financials repo: adaptive-pricing status: finished owner: codex topic_slug: helix-forge created: "2026-07-02" updated: "2026-07-03" state_hub_workstream_id: "3e348457-0ef7-4b5c-b4c5-9668e03b63ac" --- # Provider abstraction and Stripe publication Add the first outbound execution layer so internal pricing definitions can be published to Stripe without making Stripe the source of truth. ## Define Provider-Neutral Artifact Model ```task id: ADAPTIVE-WP-0007-T01 status: done priority: high state_hub_task_id: "b4eb157d-54a8-4518-b99c-16355c3e22cf" ``` Define the internal publishable artifacts for products, charge components, meters, recurring prices, discounts, commitments, and customer-specific configurations. ## Implement Stripe Mapping ```task id: ADAPTIVE-WP-0007-T02 status: done priority: high state_hub_task_id: "73fd1384-0b9e-48ea-851b-4045928e9c58" ``` Map the canonical internal primitives to Stripe Billing objects and document where the mapping is exact, approximate, or unsupported. ## Add Publish / Update / Drift Logic ```task id: ADAPTIVE-WP-0007-T03 status: done priority: high state_hub_task_id: "da137f4b-0b2a-49fb-adf2-7133cb908af0" ``` Implement idempotent publish, update, and drift-detection behavior so generated provider state remains auditable and synchronized with internal definitions. ## Preserve Reconciliation And Rollback ```task id: ADAPTIVE-WP-0007-T04 status: done priority: medium state_hub_task_id: "3e3e2fc3-f38f-4869-890a-94bffac97439" ``` Add metadata, logs, and rollback mechanics needed to reconcile internal pricing state with Stripe artifacts and to unwind failed publish attempts safely. ## Exit Criteria ```task id: ADAPTIVE-WP-0007-T05 status: done priority: medium state_hub_task_id: "1dd8f49a-87fb-43ea-9c65-b6aa909e4a56" ``` Exit when the repo can publish a validated pricing model to Stripe in a repeatable, explainable, and reversible way. Dependencies: `ADAPTIVE-WP-0003`, `ADAPTIVE-WP-0004`, `ADAPTIVE-WP-0005`.