{
  "schema_version": "archkeel-system-contract-1",
  "kind": "system",
  "title": "Checkout and payments",
  "parts": [
    {
      "id": "checkout",
      "title": "Checkout API",
      "config": "contracts/checkout.toml",
      "responsibilities": [
        "Collect and submit a checkout request."
      ],
      "provides": [
        "Submit order"
      ],
      "forbidden_responsibilities": [
        "Own the internal implementation of a different part."
      ]
    },
    {
      "id": "orders",
      "title": "Orders service",
      "config": "contracts/orders.toml",
      "responsibilities": [
        "Own order policy, payment authorization orchestration, and outcome events."
      ],
      "provides": [
        "Process order"
      ],
      "forbidden_responsibilities": [
        "Own the internal implementation of a different part."
      ]
    },
    {
      "id": "processor",
      "title": "Payment provider (mock)",
      "config": "contracts/processor.toml",
      "responsibilities": [
        "Represent the external authorization interface."
      ],
      "provides": [
        "Authorize payment"
      ],
      "forbidden_responsibilities": [
        "Own the internal implementation of a different part."
      ]
    },
    {
      "id": "audit",
      "title": "Audit sink (mock)",
      "config": "contracts/audit.toml",
      "responsibilities": [
        "Represent the downstream audit interface."
      ],
      "provides": [
        "Accept outcome event"
      ],
      "forbidden_responsibilities": [
        "Own the internal implementation of a different part."
      ]
    }
  ],
  "interfaces": [
    {
      "id": "submit-order",
      "source": "checkout",
      "target": "orders",
      "title": "Submit order",
      "schema": "schemas/submit-order.json"
    },
    {
      "id": "authorize-payment",
      "source": "orders",
      "target": "processor",
      "title": "Authorize payment",
      "schema": "schemas/authorize-payment.json"
    },
    {
      "id": "publish-outcome",
      "source": "orders",
      "target": "audit",
      "title": "Publish outcome",
      "schema": "schemas/publish-outcome.json"
    }
  ],
  "rules": []
}
