{
  "id": "type-n30",
  "revision": "ad6db07e95900c69402ec854b391499738ee41a893f299144cb7aa71c0b3e199",
  "regions": [
    {
      "id": "external",
      "label": "External",
      "parent": null
    },
    {
      "id": "server",
      "label": "Server",
      "parent": null
    },
    {
      "id": "storage",
      "label": "Storage",
      "parent": null
    }
  ],
  "nodes": [
    {
      "id": "provider",
      "label": "Payment provider boundary",
      "kind": "N30",
      "region": "external",
      "ports": [
        {
          "id": "webhook",
          "profile": "P04",
          "contract": "SignedPaymentWebhookV2",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "verify",
      "label": "Webhook signature verifier",
      "kind": "N01",
      "region": "server",
      "ports": [
        {
          "id": "webhook",
          "profile": "P04",
          "contract": "SignedPaymentWebhookV2",
          "polarity": "Require"
        },
        {
          "id": "accepted",
          "profile": "P01",
          "contract": "VerifiedPaymentEventV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "reconcile",
      "label": "Payment reconciliation",
      "kind": "N06",
      "region": "server",
      "ports": [
        {
          "id": "event",
          "profile": "P01",
          "contract": "VerifiedPaymentEventV1",
          "polarity": "Require"
        },
        {
          "id": "apply",
          "profile": "P09",
          "contract": "IdempotentPaymentStateUpdateV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "payment",
      "label": "Payment authority",
      "kind": "N21",
      "region": "storage",
      "ports": [
        {
          "id": "apply",
          "profile": "P09",
          "contract": "IdempotentPaymentStateUpdateV1",
          "polarity": "Offer"
        },
        {
          "id": "events",
          "profile": "P04",
          "contract": "PaymentCommittedV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "events",
      "label": "Payment event topic",
      "kind": "N24",
      "region": "server",
      "ports": [
        {
          "id": "publish",
          "profile": "P04",
          "contract": "PaymentCommittedV1",
          "polarity": "Require"
        }
      ]
    }
  ],
  "relations": [
    {
      "id": "webhook",
      "kind": "H04",
      "incidences": [
        {
          "node": "provider",
          "port": "webhook",
          "role": "publisher",
          "ordinal": 0
        },
        {
          "node": "verify",
          "port": "webhook",
          "role": "subscriber",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "accepted",
      "kind": "H02",
      "incidences": [
        {
          "node": "verify",
          "port": "accepted",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "reconcile",
          "port": "event",
          "role": "target",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "apply",
      "kind": "H05",
      "incidences": [
        {
          "node": "reconcile",
          "port": "apply",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "payment",
          "port": "apply",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "committed",
      "kind": "H04",
      "incidences": [
        {
          "node": "payment",
          "port": "events",
          "role": "publisher",
          "ordinal": 0
        },
        {
          "node": "events",
          "port": "publish",
          "role": "subscriber",
          "ordinal": 0
        }
      ]
    }
  ]
}
