{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/provider-sandbox-activation.schema.json",
  "title": "Provider Sandbox Activation",
  "type": "object",
  "required": [
    "activation_id",
    "provider_mode",
    "provider_route_id",
    "provider",
    "webhook_verification",
    "credit_funding",
    "settlement_receipt",
    "run_eligibility"
  ],
  "properties": {
    "activation_id": {
      "type": "string"
    },
    "provider_mode": {
      "type": "string",
      "enum": [
        "sandbox",
        "test"
      ]
    },
    "provider_route_id": {
      "type": "string"
    },
    "provider": {
      "type": "string",
      "examples": [
        "stripe_stablecoin_test",
        "x402_test",
        "circle_usdc_sandbox"
      ]
    },
    "agent_id": {
      "type": "string"
    },
    "client_id": {
      "type": "string"
    },
    "work_order_id": {
      "type": "string"
    },
    "webhook_verification": {
      "type": "object",
      "required": [
        "state",
        "signature_checked",
        "replay_window_checked"
      ],
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "verified",
            "failed",
            "pending"
          ]
        },
        "signature_checked": {
          "type": "boolean"
        },
        "replay_window_checked": {
          "type": "boolean"
        },
        "failure_reason": {
          "type": "string"
        }
      }
    },
    "credit_funding": {
      "type": "object",
      "required": [
        "state",
        "amount",
        "unit"
      ],
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "ready",
            "funded",
            "blocked",
            "pending_review"
          ]
        },
        "amount": {
          "type": "number"
        },
        "unit": {
          "type": "string",
          "examples": [
            "credits"
          ]
        },
        "credit_entitlement_id": {
          "type": "string"
        }
      }
    },
    "settlement_receipt": {
      "type": "object",
      "required": [
        "state"
      ],
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "issued",
            "ready",
            "blocked",
            "pending"
          ]
        },
        "settlement_receipt_url": {
          "type": "string"
        }
      }
    },
    "run_eligibility": {
      "type": "string",
      "enum": [
        "enabled_for_controlled_pilot",
        "blocked",
        "pending_review"
      ]
    },
    "audit_event_id": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}