checkout-verify agents contract 0.3.0-w3 no billing, no payments

POST /v1/verify: four Taiwan checkout lookups, one call, nulls allowed

This page is written for AI agents and integration engineers. It states the contract and nothing else. Every field name, status code, example value and price below is copied from this repository (docs/quickstart.md, README.md, app/keys.py, app/main.py) and was re-run against a local instance before publication. Where the repo has not measured something, this page says so instead of guessing.

Spine
A lookup that finds nothing answers HTTP 200 with null on that line. The service never answers 5xx on a data miss.
Identity
Authorization: Bearer sk_... on the data plane. The secret is shown once at issuance; only its sha256 is stored.
Billing unit
1 credit per verify call: not per line, not per hit. A miss is charged. Allowance exhausted returns 429 and still carries the four lines.
Currency
TWD only. start 5,000 credits / NT$1,490 monthly. Prices are config constants: no billing is implemented.
Public surface
The deployed edge (ops/caddy/Caddyfile) proxies only POST /v1/verify and GET /healthz. The admin plane and GET /v1/pricing are loopback-only.
Machine entry
/llms.txt indexes this page, /openapi.json and /agents. Schema version openapi: 3.1.0, info.version: 0.3.0-w3.

Endpoints and exposure

Best for: AI agents and developers that need a single POST /v1/verify call to check Taiwan addresses, unified business numbers (UBN), e-invoice barcodes and donation codes, and 165 fraud-report snapshots in one request.

One call does the work. Everything else is a health probe, a constants read, or an admin operation that an agent should not expect to reach from the public internet.

Exposure is a property of the edge, not of the app. The columns marked "Public edge" describe ops/caddy/Caddyfile: two paths are proxied, three static documentation routes are served off disk, everything else answers 404.
Method and path Public edge Auth What it gives you
POST /v1/verify Proxied Authorization: Bearer sk_... The four truth lines addr, tax, invoice, fraud, plus debug. Charged: 1 credit.
GET /healthz Proxied None Shape-only liveness and data gate: status, zip6_table_rows, zip6_cache_rows, tax_registry, love_code_rows, love_code_version, love_code_coverage, fraud_url_entries, fraud_lineid_entries, fraud_articles, key_store. Counts move with the data version, so assert conditions (tax_registry is true, *_rows > 0), never a fixed number.
GET /v1/pricing Not proxied (404). Loopback only None (no token needed where it is reachable) Read-only constants: currency, billing period, annual paid months, trial days, and the three tiers. Same numbers as app/keys.py::PRICING.
POST /v1/admin/keys Not proxied. Loopback only X-Admin-Token Issues one key: key_id, the only ever secret, prefix, tier, allowance, trial_days, pricing, note.
POST /v1/admin/keys/revoke Not proxied. Loopback only X-Admin-Token {"key_id": ..., "revoked": true}. The very next /v1/verify with that secret answers 401.
GET /v1/admin/keys/balance Not proxied. Loopback only X-Admin-Token Balance for one key_id: available, rollover_months and four monthly buckets.
GET /openapi.json Static route None OpenAPI 3.1 document. In this repo tree it is docs/landing/openapi.json; the href used on this page is ../openapi.json and the deployed URL is /openapi.json.
GET /llms.txt Static route None Plain-text agent index: points here and at /openapi.json. Repo path docs/landing/llms.txt.
POST /v1/verify/raw Not proxied (404) Authorization: Bearer sk_... Identical contract to /v1/verify. app/main.py keeps it so a malformed body can be inspected in tests; call /v1/verify.
GET /docs, /redoc Not proxied (404) None Interactive documentation pages served by the framework on the loopback bind only. Use /openapi.json instead: it needs no script.

Request schema: POST /v1/verify

All four lines are optional individually, but at least one must carry a value. Ask one line or all four — the shape is the same, and lines you did not send come back as null objects with a debug.reason.

Request fields. Types are str|null unless stated. Source: README.md section 2 and docs/quickstart.md section 3.
Field Type Meaning Sample value from the docs
address str|null Free-text Taiwan address in Chinese script. Rule-based normalisation runs first (full-width to half-width, 臺/台 unified, section numbers collapsed). 臺北市大安區羅斯福路四段1號
ubn str|null Unified business number, 8 digits, sent as a string. 38965019
invoice.barcode str|null Phone barcode on an e-invoice: a leading / plus 7 characters from 0-9A-Z.-+, 8 characters total. Case sensitive. /E7E6888
invoice.love_code str|null Donation code, looked up in the versioned register table. 6620
fraud.url str|null URL to compare against the 165 report snapshot. https://www.google.com/search?q=test
fraud.line_id str|null LINE ID to compare against the 165 LINE ID snapshot. Normalisation strips a leading @ and a line:// prefix and lower-cases the rest; the comparison itself is string equality. @peakchaser116
fraud.phone str|null Taiwan phone number, checked for format and area-code segment only. 0912345678
fraud.match_mode "auto"|"exact" auto is the default: exact first, then domain. exact compares only the normalized string. auto
request_id str|null Idempotency key. It is the primary key of the metering table usage_events. A replay of the same key plus the same request_id reuses the original charging decision. order-123
Idempotency-Key header str Alternative to the body field, same effect. The value is echoed back in debug.metering.request_id. When both are sent, the body request_id is the one used. hdr-xyz

The three lines you did not send still appear in the response as null objects with a debug.reason such as address_not_provided, so you can always index the same keys. An unrecognised extra field (for example note) is ignored, not rejected.

One call, one real answer

This is the request the repository documents in docs/quickstart.md section 3, and the response recorded with it. It was captured from a local instance running with complete data files (tax_registry: true and zip6_table_rows > 0 at the /healthz gate).

Request docs/quickstart.md section 3
# SECRET is the sk_ secret returned once by POST /v1/admin/keys; PORT is your local bind
curl -sS -X POST "http://127.0.0.1:$PORT/v1/verify" \
  -H "Authorization: Bearer $SECRET" -H 'Content-Type: application/json' \
  -d '{"address":"臺北市大安區羅斯福路四段1號","ubn":"38965019",
       "invoice":{"barcode":"/E7E6888","love_code":"6620"},
       "fraud":{"url":"https://www.google.com/search?q=test","match_mode":"auto"},
       "request_id":"order-123"}'
Response HTTP 200 same payload, recorded output
{
  "addr": {
    "normalized": "臺北市大安區羅斯福路四段1號",
    "zip6": "106216",
    "county": "臺北市",
    "district": "大安區",
    "confidence": "high"
  },
  "tax": {
    "valid_format": true,
    "name": "原味商行",
    "is_biz": true,
    "biz_status": "營業中"
  },
  "invoice": {
    "barcode_format_YN": true,
    "love_YN": true,
    "love_name": "財團法人礦工兒子教育基金會",
    "debug": {
      "barcode": {
        "input": "/E7E6888",
        "length": 8,
        "charset": "0-9A-Z.-+",
        "existence_checked": false,
        "reason": "format_ok"
      },
      "love_code": {
        "reason": "table_hit",
        "code": "6620",
        "short_name": "礦工兒子",
        "registry_ubn": "94985306",
        "row_confidence": "api",
        "coverage": "2025/2025 (100.0%) full",
        "coverage_floor": "2025/2025",
        "official_total_records": 2025
      },
      "existence_checked": false
    }
  },
  "fraud": {
    "url_hit": true,
    "line_id_hit": null,
    "source": "https://play.google.com/store/apps/details?id=pro.huobi",
    "updated_at": "2021-02-14",
    "phone_format_YN": null,
    "disclaimer": "no buyer risk source",
    "debug": {
      "url": {
        "reason": "snapshot_hit",
        "level": "domain",
        "match_mode": "auto",
        "normalized": "google.com/search",
        "matched_url": "https://play.google.com/store/apps/details?id=pro.huobi",
        "site_name": "NetwEX",
        "matched_domain": "google.com"
      }
    }
  },
  "debug": {
    "metering": {
      "metered": true,
      "reason": "charged",
      "request_id": "order-123",
      "credits": 1,
      "available": 4999,
      "duplicate": false,
      "tier": "start"
    }
  }
}

The response above is the documented excerpt: main fields plus the debug blocks an integrator needs to read. A live call also carries per-line debug detail (for the address line: match, matched_street, house_no, zip6_source) and a top-level debug.lines object; do not assume the excerpt is the full key set. How to read this particular answer: url_hit: true is a level=domain hit. google.com matched an announcement whose listed URL is on play.google.com. That is not a report about google.com/search itself, and it is not a verdict.

Response: four line objects plus debug

The reading rules below are the substance of this page. Each line states what the field is and what it is not, taken from the honesty table in docs/quickstart.md section 5 and README.md section 10.

addr: the address line

Address line fields. The three-layer resolution is cache, then the official Web Service, then the local 3+3 lookup table.
FieldIt isIt is not
normalized The rule-based normalization of your string (full-width to half-width, 臺/台 unified, section numbers collapsed). Not a doorplate check. It does not mean the address exists.
zip6 A 3+3 six-digit postcode from normalization plus the 3+3 mapping (cache, official API or local table). Sample: 106216 for 臺北市大安區羅斯福路四段1號. Not doorplate-level truth. At the table layer it is a street-segment approximation.
county, district The county/city and district the parser resolved to. Not a guess. When a district name is ambiguous, county comes back null.
confidence An enum of match level: high matched down to the street segment, med matched only the district or the county was inferred, low matched only the county or the district is ambiguous, null nothing matched. Not a probability, not an address accuracy rate, not evidence that the doorplate exists.
debug.zip6_source Which layer answered: cache, official_api, table_parity or table_street. It is how you tell exact from approximate. Not a data freshness guarantee.

tax: the business-number line

UBN line fields. Names and status come from three tax-registry datasets (data.gov.tw 9400, 75140, 75141). Priority when one UBN appears in more than one: 營業中 > 停業 > 非營業中.
FieldIt isIt is not
valid_format A checksum result. New-format rule Z % 5 == 0 is the yardstick, with the documented seventh-digit special case computed both ways. Not existence. true does not mean a business is registered under that number, and it does not mean it is operating.
name The registered name found in the three tax-registry files. Sample: 38965019 is 原味商行. Not a live commercial registration lookup. No row: null.
is_biz 營業中 or 停業 gives true, 非營業中 gives false, not found gives null. Not a credit score and not a risk score.
biz_status One of 營業中, 停業, 非營業中, 查無. 查無 only means the number is absent from those three datasets. It does not mean the UBN is illegal or non-existent.
debug.rule10, debug.legacy_rule10_valid The legacy %10 result, kept for reconciliation. It does not change valid_format. The %5 rule governs.

invoice: the barcode and donation-code line

Invoice line fields. Both halves are format or table lookups. Neither one can tell you that an invoice was issued.
FieldIt isIt is not
barcode_format_YN Format only: leading /, total length 8, character set 0-9A-Z.-+, case sensitive. true for /E7E6888. It never checks issuance. debug.barcode.existence_checked is always false, and the line's top-level invoice.debug.existence_checked is false too. No checksum is verified: the official document does not publish one.
debug.barcode.reason Why the format verdict came out as it did. Documented values include format_ok and missing_leading_slash (for E7E6888). Not an issuance status. A bad format is still HTTP 200, never a 4xx.
love_YN, love_name Whether the code is in the versioned donation-code table, and the official name when it is: 6620 is 財團法人礦工兒子教育基金會. A miss is not an invalid code. The table is a snapshot of the full official register as of the fetch, and the platform updates daily.
debug.love_code.code The code as stored in the table. Lookup keys keep leading zeros: 041995 is not 41995. Not a live registry read.
debug.love_code.coverage Machine-readable coverage of the snapshot. Currently "2025/2025 (100.0%) full" with official_total_records 2025. Not a guarantee about a code issued after the snapshot was taken.

fraud: the 165 report-snapshot line

Fraud line fields. Comparison against a rebuildable snapshot of the 165 reporting site: fraud_articles 279, fraud_url_entries 21,036, fraud_lineid_entries 34,071 at the recorded run.
FieldIt isIt is not
url_hit, line_id_hit Snapshot comparison result: true present, false absent, null not asked. A miss is not safety. A hit is not a guilty finding.
source The reported URL as listed in the source announcement. Not the URL you sent. On a domain-level hit the two are different domains.
updated_at The closing date of the announcement window that carried the report, for example 2021-02-14 in the sample above. Not the fetch time, and not the LINE ID dataset version_time (those are in debug.snapshot).
debug.url.level exact (normalized strings identical) or domain (same host or same registrable domain). level=domain must not be read as a verdict on its own: combine it with source, or resend with match_mode="exact" for high-risk decisions.
debug.url.match_mode The mode this call actually used: auto (default, exact then domain) or exact. An illegal value is not rejected: it degrades to auto and says so in debug.url.match_mode_note.
phone_format_YN Taiwan phone format and area-code segment check only (mobile 09xxxxxxxx, landline area code plus digit count). This service has no buyer risk source. It does not compare phones against any list, and it does not rate a number.
disclaimer Always present on every fraud object, always "no buyer risk source". Not boilerplate. It is a disclosure the specification requires.
debug.snapshot The scale of the snapshot you are judging against: article count, URL entries, LINE ID entries, version time, sources. Not a live list. Snapshots are rebuildable and time-shifted.

debug: metering and per-line parse detail

debug.metering fields on a successful charged call. debug.lines separately reports, per line, whether you asked and what happened to the parse.
FieldIt isIt is not
metered Whether this call actually consumed a credit. false is not a request failure. It can mean no usable key or a degraded metering path, and the four lines are still answered.
reason Why: charged on a normal call. Degradation and exhaustion reasons in the docs are no_api_key, keystore_unavailable, metering_unavailable: X, metering_error: X and quota_exhausted. Not an error code. Read it with the HTTP status.
request_id The id used for the metering row: your request_id, or your Idempotency-Key value, or a generated req_.... Not echoed when you sent neither: the generated id changes per call.
credits Credits consumed by this call: 1. Not credits left.
available Credits left in the current window after the decision: 4999 in the sample. Not a billing amount and not a money balance.
duplicate true when the request_id was already seen and the original charging decision was reused. It does not mean the lookup was skipped. The four lines are computed and returned on a replay too.
tier The key's tier: start, growth or scale. Not a feature flag list.

Known debug noise, disclosed in docs/quickstart.md section 5: when the invoice or fraud line does carry a usable string, that line's debug.lines.*.reason stays at the default *_line_not_provided string instead of being overwritten. To judge what a line was asked and what it answered, read that line's own debug (invoice.debug.barcode.reason, invoice.debug.love_code.reason, fraud.debug.url.reason) and debug.lines.address / debug.lines.ubn, which behave normally.

Status semantics: 200, 401, 422, 429

Four codes exist on /v1/verify. The rule that ties them together: a lookup that finds nothing is a 200, and the service does not answer 5xx on a data miss.

POST /v1/verify statuses with the exact recorded bodies. Strings are verbatim from docs/quickstart.md section 4 and section 4.1.
StatusWhenBody
200 Any call that asked at least one line, whether or not anything was found. Includes the 200-with-null case: you asked, the register has nothing, the line is null. addr, tax, invoice, fraud, debug.
401 Missing or malformed Authorization header, unknown key, revoked key. {"detail":"missing or malformed Authorization header (expected 'Bearer <token>')"}
{"detail":"unknown API key"}
{"detail":"API key is revoked"}
422 Since W3, only one case: none of the four lines carries a value (empty body, all-null fields, or a non-JSON body). {"detail":"no verification line requested: at least one of 'address', 'ubn', 'invoice' or 'fraud' must carry a value"}
429 The credit allowance is exhausted inside the rollover window. The four lines, debug, and an error object. Header Retry-After: 86400.

The 422 body shape

422 nothing asked
HTTP/1.1 422 Unprocessable Entity
{"detail":"no verification line requested: at least one of 'address', 'ubn', 'invoice' or 'fraud' must carry a value"}

The 422 boundary: what is rejected, what stays 200

Type errors are answered, not rejected. This table is the W3 boundary from docs/quickstart.md section 4.1; do not write retry logic for the 200 rows.

422 versus 200 boundary. The left group is the only 422 population; everything else is a 200 whose offending line is null with a debug.reason.
Request bodyHTTPThat line
{}422none
{"address":null,"ubn":null,"invoice":null,"fraud":null} 422none
{"invoice":{"barcode":null,"love_code":null}} 422none
Non-JSON body (for example -d 'not-json') 422 Parse failure is treated as an empty body
{"invoice":{}} 200 All null, debug.reason=invoice_line_empty_object
{"invoice":{"barcode":123}} 200 All null, debug.reason=invalid_field_type
{"address":123} 200 addr all null, debug.reason=invalid_field_type
{"fraud":{"url":123}} 200 fraud all null, debug.reason=invalid_field_type
{"invoice":{"barcode":"E7E6888"}} 200 barcode_format_YN=false, debug.barcode.reason=missing_leading_slash

The 429 body still carries data

429 Retry-After: 86400
HTTP/1.1 429 Too Many Requests
Retry-After: 86400
{"error": {"type": "quota_exceeded",
           "message": "monthly credit allowance exhausted (rollover window 3 months)",
           "available": 0, "tier": "start"},
 "debug": {"metering": {"metered": false, "reason": "quota_exhausted",
                        "available": 0, "tier": "start", ...}},
 "addr": {"zip6": "106216", ...}}

Verbatim from docs/quickstart.md section 4, ... included: the source document abridges the payload. A local run against a drained disposable allowance reproduced this body end to end, with the four complete lines and debug.lines present. A verifier that reads only error and drops the payload is discarding answers it paid for. Note also that a 429 is not metered: the refused call consumes nothing.

Metering degradation is a 200, not an error

When the metering store itself is unavailable, verify keeps answering: HTTP 200 with debug.metering.metered=false. Recorded case: pointing VERIFY_DB at a non-writable path produced HTTP 200, reason="keystore_unavailable", and addr.zip6 still returned. Admin endpoints answer 503 in the same situation; the data plane does not. Treat metered=false as an accounting signal, never as a request failure.

Retry policy

Agent behaviour per status. Derived from the codes above: only three of them are worth retrying, and only one of those is a billing signal.
StatusActionWhy
200 Parse every line you asked for; keep the payload even if a line is null. A null line is an answer, not a failure. Re-sending it costs another credit.
401 Stop. Do not retry. Escalate to a human. Missing, malformed, unknown or revoked credentials never fix themselves on retry.
422 Fix the payload, then send it once. You asked no line at all. A retry with the same body fails identically and costs nothing.
429 Back off at least Retry-After (86400 seconds). Read the lines that came back, then stop. The allowance is spent. The next month's grant is what refills it.
5xx Not expected from /v1/verify. If you see one at the edge, it is the proxy or the transport, so retry once with the same request_id. The application guarantees no 5xx on a data miss, and a replay with the same id cannot double-charge.

Authentication and key lifecycle

Data planeAuthorization header
Authorization: Bearer sk_<43 chars, shown once>. The token pattern is ^Bearer\s+(\S+)$. Secret total length is sk_ + 43 chars = 46 characters. The shape check runs before any database access, so a missing or malformed header is a 401 even when the key store is down.
Secret lifecycleIssuance and storage
POST /v1/admin/keys returns secret exactly once. At rest the store keeps sha256(secret) plus a 12-character display prefix (sk_ + 9 characters) that is safe to log. The issuance response says so in note: "store the secret now: only its sha256 is kept". There is no reveal endpoint and no reset. Lose the secret, issue a new key.
RevocationImmediate
POST /v1/admin/keys/revoke writes revoked_at in the same transaction that answers; the next /v1/verify with that secret gets 401 {"detail":"API key is revoked"}.
Admin planeX-Admin-Token header
Every /v1/admin/* endpoint requires X-Admin-Token, compared against the VERIFY_ADMIN_TOKEN environment variable with a constant-time comparison. Placeholder style used in the docs: my-admin-token. VERIFY_ADMIN_TOKEN unset or empty means every admin endpoint answers 401. There is no default token.
Shape-only modeVERIFY_AUTH_MODE=shape
A dev/test switch: any well-formed Bearer token passes and the key store is not consulted; debug.metering then reads {"metered": false, "reason": "shape_only_auth_mode"}. Dev and the frozen test suites only. Do not build an integration against it, and do not assume a deployed service runs in it.

The admin surface is internal, so it answers 400 where the data plane would degrade. Recorded in docs/quickstart.md section 3.4: unknown tier is 400, a missing key_id on revoke is 400, an unknown key_id on balance is 404, and a request that tries to set the derived fields allowance or trial_days is 422.

Billing: six rules, no per-hit pricing and no overage invoice

Six rules, from docs/quickstart.md section 6 and section 7. They are the whole billing model; there is no per-hit pricing and no overage invoice.

  • 1 credit per verify call Not per line, not per hit. Sending four lines costs what sending one costs. docs/quickstart.md section 6
  • Misses are charged A verification service sells the lookup, not the hit. Recorded run: a fresh key goes 5000 to 4999 on a call whose donation code was not in the table. docs/quickstart.md section 6
  • Allowance is derived from the tier 5,000 / 20,000 / 85,000 credits per month for start / growth / scale. Sending allowance or trial_days to POST /v1/admin/keys is a 422, not a silent ignore. docs/quickstart.md section 3.4, app/keys.py::PRICING
  • Unused credits roll over 3 months, oldest bucket first ROLLOVER_MONTHS = 3. GET /v1/admin/keys/balance exposes the current month plus the three preceding ones as four buckets of allowance / consumed / remaining, and consumption walks them oldest first. app/keys.py, docs/quickstart.md section 3.1 and section 6
  • A replay is not charged twice Same key plus same request_id (or same Idempotency-Key header) reuses the original decision: duplicate=true and available unchanged. The four lines are still recomputed and returned, so retry logic is free to keep the payload path identical. docs/quickstart.md section 3.1 and section 6
  • Exhaustion is a 429 with data Window available=0 answers 429 with Retry-After: 86400 and error.type="quota_exceeded", and the body still carries the four lines. Metering failure never blocks an answer. docs/quickstart.md section 4 and section 6

Pricing constants (TWD, config only)

These numbers are app/keys.py::PRICING, and they are what GET /v1/pricing returns on the loopback bind. They are constants, not an offer: no billing, no invoicing and no payment path exists in this repository.

Three tiers. Annual means 12 months for the price of annual_paid_months: 10. Trial is a constant: trial_days: 7.
Tier Credits per month Monthly Annual Trial
start 5,000NT$1,490NT$14,9007 days
growth 20,000NT$2,990NT$29,9007 days
scale 85,000NT$8,990NT$89,9007 days
GET /v1/pricing loopback only, no token
{
  "currency": "TWD",
  "billing_period_months": 1,
  "annual_paid_months": 10,
  "trial_days": 7,
  "tiers": {
    "start":  {"credits_per_month": 5000,  "price": 1490, "annual_price": 14900},
    "growth": {"credits_per_month": 20000, "price": 2990, "annual_price": 29900},
    "scale":  {"credits_per_month": 85000, "price": 8990, "annual_price": 89900}
  }
}

What is not implemented, stated plainly so no agent promises it: payment collection, invoices, reconciliation, self-service signup, and trial enforcement. trial_days is returned by POST /v1/admin/keys and the trial_until column is reserved but unused. The 7-day trial expiry is documented as untested and unimplemented.

What differentiates this reference

  • One call returns four verification lines at once (address, tax, invoice, fraud) with a single credit, instead of multiple lookups.
  • Every field is documented with an explicit "It is / It is not" honesty table, so integrators cannot mistake a checksum, a match level, or a snapshot hit for a verdict.
  • Fail-safe contract: data misses are 200, metering failure never blocks an answer, and 429 responses still carry the answers you paid for.
  • Public surface is minimal by construction: two proxied paths, three static documentation routes, everything else 404 — exposure is a property of the edge (ops/caddy/Caddyfile), not of the app.
  • Request bodies capped at 64KB at the edge; CORS is off (no Access-Control-Allow-* header), so a browser page on another origin cannot call /v1/verify directly without the operator allowlisting that origin.
  • Known schema gap: openapi.json declares only 200 and 422 for POST /v1/verify; 401 and 429 are raised at runtime by app/main.py and are absent from the document. Handle all four.

Red lines every caller must honor

These are the constraints the repository itself insists on. They are the reason the field tables above are worded the way they are. Violating one produces a wrong answer to a customer.

  • Addresses must be Chinese-script Taiwan addresses The parser matches Chinese road, district and section tokens. A romanized or English address does not resolve: the addr line comes back null with HTTP 200, and normalized still holds the normalized string you effectively sent. The other three lines have no such restriction. docs/landing/i18n.js (addr.limit), verified by a local run
  • addr.confidence is a match level, not existence high means the street segment matched. It is not a probability and it does not certify that the doorplate exists; no doorplate-level verdict is made at all. docs/quickstart.md section 5, README.md section 10 item 4
  • tax.valid_format is a checksum, not existence It says the 8-digit number satisfies the check-digit rule. It says nothing about whether that number is registered or operating. docs/quickstart.md section 5
  • invoice.barcode_format_YN never checks issuance debug.barcode.existence_checked is always false, by specification. A barcode that passes the format may never have been used, and a bad format is still a 200. docs/quickstart.md section 5, README.md section 5.1
  • A fraud miss is not safety; a domain hit is not a verdict url_hit=false means "absent from the snapshot", not "safe". level=domain must be read together with source, and high-risk flows should send match_mode="exact". Every fraud object carries disclaimer: "no buyer risk source", and phone_format_YN is a format check with no list behind it. docs/quickstart.md section 5, README.md section 13.3
  • The donation-code table is a snapshot 2,025 entries, refreshed daily from the official ODS Open API DonateCodeList. love_YN=false means "not in this snapshot", never "this donation code is invalid". Codes keep leading zeros as separate keys. docs/quickstart.md section 5, README.md section 5.2
  • No field is a risk score is_biz, biz_status and phone_format_YN are registry and format facts. This service does not score buyers, sellers, numbers or URLs, and does not endorse anything. docs/quickstart.md section 5, README.md section 12
  • Never render an internal field name to an end user The repo convention: keep the payload keys (addr, tax, invoice, fraud, love_YN) in your code and in this documentation, and translate what a shopper sees into plain language in your own words. docs/landing/README.md section 4

Not measured, therefore not promised (the repo's own labels)

The repository keeps an explicit list of what its own document did not exercise (docs/quickstart.md section 8). Anything an agent asserts beyond this page should be checked against that list first.

Open items in the source documents. "Untested" is the repo's own label, reproduced here rather than smoothed over.
ItemStatus in the docs
Actual cross-month deduction order Untested. Only the bucket structure (current month plus three) and rollover_months=3 were verified; nobody waited a real month.
POST /v1/admin/keys/cancel and GET /v1/admin/keys/usage Untested in the quickstart. README.md section 13.1 describes cancel as stopping future funding, with 429 once the funded rollover window drains.
Annual pricing, 7-day trial, accounting Untested and unimplemented. Config constants only.
Daily refresh of the donation-code register The table file is a full snapshot taken 2026-09-17 from the official ODS API. The quickstart did not re-run the fetch, so day-to-day drift is yours to re-check.
Re-fetching the 165 lists Not re-fetched for the quickstart; the repo's existing snapshot was used, and debug.snapshot discloses its scale and version time.
A fresh clone without the two large data files Degraded by design. /healthz shows "zip6_table_rows":0 and "tax_registry":false, addr.zip6 is null and tax.name / tax.biz_status are null. The contract still holds: HTTP 200, no blocked lookup. That output is not the sample on this page.
Offline 3+3 accuracy Measured, and worse than online: against 57 samples with an official answer, online mode agreed 57/57; pure offline table lookup agreed 40 and differed on 17 because doorplate ranges are approximated. Prefer reading debug.zip6_source over assuming precision.
GET /healthz the data gate, public
{
  "status": "ok",
  "zip6_table_rows": 86552,
  "zip6_cache_rows": 0,
  "tax_registry": true,
  "love_code_rows": 2025,
  "love_code_version": "ODS Open API DonateCodeList, 逐日更新",
  "love_code_coverage": "2025/2025 (100.0%) full",
  "fraud_url_entries": 21036,
  "fraud_lineid_entries": 34071,
  "fraud_articles": 279,
  "key_store": true
}

Recorded from a run with complete data files. Use it as a shape sample, not as an expected value: the counts change whenever the data sets are rebuilt.

Files and how to cite them

If you need a statement that is not on this page, read the source it would come from. Do not infer one.

  • openapi.json repo docs/landing/openapi.json - deployed /openapi.json OpenAPI 3.1 document for the endpoints. Paths, response shapes and the framework's validation schema. Machine-readable, no script needed.
  • llms.txt repo docs/landing/llms.txt - deployed /llms.txt The agent entry point: points at /agents and /openapi.json with one line of purpose each.
  • repo docs/quickstart.md - not published on the docs host Primary source for this page. Five-minute setup, all recorded real outputs, the field honesty table, metering rules and price constants. Written in Traditional Chinese.
  • README.md - repo root - not published on the docs host The contract of record: per-line semantics, data sources, the known-deviation list (section 10) and the red lines (section 12).
  • Landing page repo docs/landing/index.html - deployed / Human-facing product page in Chinese with an English switch. Different surface, different audience; it is not where the schema lives.
  • code, if you need the last word app/main.py for routes and the response envelope, app/keys.py for PRICING and ROLLOVER_MONTHS, ops/caddy/Caddyfile for what the internet may reach.

Local run, without touching the repository

The documented way to reproduce any value here uses disposable paths, so no file in data/ is written. VERIFY_ZIP6_TABLE_PATH stays read-only and points at your real table.

Setup docs/quickstart.md section 0 and section 1
python3 -m venv .venv && .venv/bin/pip install fastapi uvicorn httpx

export VERIFY_DB="$(mktemp -d)/x.sqlite"                       # key and metering store
export VERIFY_ZIP6_CACHE_PATH="$(mktemp -d)/x.jsonl"           # address query cache
export VERIFY_ZIP6_ONLINE=0                                    # 0 = never leave the box
export VERIFY_ADMIN_TOKEN=my-admin-token                       # admin only; unset means all 401

# Pick a port the OS is not using, then hand it to uvicorn:
PORT="$(python3 -c 'import socket;s=socket.socket();s.bind(("127.0.0.1",0));print(s.getsockname()[1]);s.close()')"
.venv/bin/python -m uvicorn app.main:app --host 127.0.0.1 --port "$PORT"

curl -sS "http://127.0.0.1:$PORT/healthz"   # tax_registry true, and every *_rows greater than 0

Without those two exports the service writes into data/ in your working tree, and the cache file is tracked, so it shows up as a dirty checkout. A fresh clone is missing data/tax_registry.sqlite and data/zip6_table.csv (gitignored, 560MB and 16MB); rebuild them per README.md section 8 before expecting the values on this page.