{
  "openapi": "3.1.0",
  "info": {
    "title": "SCDO payment receipt verification",
    "version": "1.0.1",
    "description": "Free public verification of native SCDO transfers on Shard0 (chainId 5680) and downloadable English audit receipts. Operator: 9Y9 PTY LTD trading as SCDO Laboratory. This API does not settle funds, invoice, or grant entitlements. paid=true only means expected terms matched a confirmed transfer.",
    "contact": {
      "email": "admin@scdo.com.au",
      "url": "https://scdo.com.au/payments/"
    }
  },
  "servers": [
    {
      "url": "https://scdo.com.au"
    }
  ],
  "paths": {
    "/payments/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Verifier health",
        "responses": {
          "200": {
            "description": "Service can reach the official RPC"
          },
          "503": {
            "description": "RPC unavailable; not a payment result"
          }
        }
      }
    },
    "/payments/docs": {
      "get": {
        "operationId": "getDocs",
        "summary": "Human/machine API notes",
        "responses": {
          "200": {
            "description": "JSON description"
          }
        }
      }
    },
    "/payments/service.json": {
      "get": {
        "operationId": "getService",
        "summary": "Service description for agents",
        "responses": {
          "200": {
            "description": "JSON service description"
          }
        }
      }
    },
    "/payments/verify": {
      "get": {
        "operationId": "verifyGet",
        "summary": "Verify a native SCDO transfer",
        "parameters": [
          {
            "name": "tx",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payTo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amountScdo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amountWei",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minConfirmations",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Verification result"
          },
          "202": {
            "description": "Pending"
          },
          "400": {
            "description": "Invalid request"
          },
          "503": {
            "description": "Unknown; not paid"
          }
        }
      },
      "post": {
        "operationId": "verifyPost",
        "summary": "Verify a native SCDO transfer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tx": {
                    "type": "string"
                  },
                  "network": {
                    "type": "string"
                  },
                  "minConfirmations": {
                    "type": "integer"
                  },
                  "expect": {
                    "type": "object",
                    "properties": {
                      "payTo": {
                        "type": "string"
                      },
                      "from": {
                        "type": "string"
                      },
                      "amountScdo": {
                        "type": "string"
                      },
                      "amountWei": {
                        "type": "string"
                      }
                    }
                  }
                },
                "required": [
                  "tx"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification result"
          },
          "202": {
            "description": "Pending"
          },
          "400": {
            "description": "Invalid request"
          },
          "503": {
            "description": "Unknown; not paid"
          }
        }
      }
    },
    "/payments/receipt/{tx}.json": {
      "get": {
        "operationId": "getReceiptJson",
        "summary": "Downloadable JSON audit receipt. Query payTo, from, and amountWei to re-verify the same bound terms. PNG receipts are not supported.",
        "parameters": [
          {
            "name": "tx",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payTo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amountWei",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amountScdo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Receipt JSON"
          }
        }
      }
    },
    "/payments/receipt/{tx}.html": {
      "get": {
        "operationId": "getReceiptHtml",
        "summary": "Downloadable English HTML audit receipt. Same bound-term query as the JSON receipt. PNG receipts are not supported.",
        "parameters": [
          {
            "name": "tx",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payTo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amountWei",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amountScdo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Receipt HTML"
          }
        }
      }
    }
  }
}