{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "enum": [
        "PENDING_SELECTION",
        "SIMULATED_PAID",
        "NOT_PAYABLE"
      ]
    },
    "reward": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "const": "TEST_CREDIT"
        },
        "amount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 25
        },
        "redeemable": {
          "type": "boolean",
          "const": false
        }
      },
      "required": [
        "unit",
        "amount",
        "redeemable"
      ],
      "additionalProperties": false,
      "description": "Fictional, non-redeemable credits. No currency, funds, wallet, fees or payment processor."
    },
    "receipt_id": {
      "anyOf": [
        {
          "type": "string",
          "allOf": [
            {
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "pattern": "^[a-f0-9-]+$"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "state",
    "reward",
    "receipt_id"
  ],
  "additionalProperties": false,
  "description": "Server-owned simulated payment status. Only SELECTED receives 25 TEST_CREDIT and a single receipt; every other final outcome gets zero.",
  "title": "Payment",
  "$comment": "owp-market-local/0.2; fictional loopback market, non-redeemable test credits only."
}
