# ThaiFi MPP Portal (portal.thaifi.com)

Directory of independent MPP servers on ThaiFi chain 17. Use it to find
machine-payable services, then buy DIRECTLY from the seller's own server.
Discovery is free — the portal takes no cut of purchases and never
intermediates payments. Sellers choose the price and the token.

## Find a service

    GET https://portal.thaifi.com/listings            # all active listings (JSON)
    GET https://portal.thaifi.com/listings/{id}       # one listing
    GET https://portal.thaifi.com/search?q=images     # keyword search

Each listing carries `url` (the seller's MPP origin) and `services[]`
(`method`, `path`, `price`, `token`, `description`).

## Buy (direct, seller-side)

Call the seller's endpoint at their origin. On `402 Payment Required`, follow
THEIR MPP challenge: pay the quoted amount on chain 17 with the attribution
memo bound to their challenge, then retry with
`Authorization: Payment <base64url credential>`. This is the standard MPP
tempo-charge push flow — the portal is not involved.

With the ThaiFi wallet CLI it is one command:

    thaifi request https://SELLER-Origin/PATH -X POST \
      -H 'content-type: application/json' -d '{"…":"…"}'

`thaifi request` parses the 402, pays from your wallet access key, and retries
with the credential automatically.

## List your own MPP server

If you run an MPP server (any origin, any price, any TIP-20 token), list it:

    POST https://portal.thaifi.com/listings
    content-type: application/json

    {"name":"…","url":"https://your-origin","description":"…",
     "services":[{"name":"…","method":"POST","path":"/…",
                  "price":"…","token":"…"}]}

The first POST returns `402` — pay the **10 THCFI** one-time listing fee
(MPP tempo charge, push mode; `thaifi request` handles it) and retry. You get
an `edit_key` for free updates (`PATCH https://portal.thaifi.com/listings/{id}` + `x-edit-key`
header) and unpublishing (`DELETE`). Origins are probed hourly; unreachable
for 14 days → unpublished. Listing fee is non-refundable.

## Chain

- ThaiFi chain 17 · RPC https://rpc.thaifi.com
- Listing-fee token: THCFI `0x20c000000000000000000000c82102FFe7064362` (6 decimals)
- Sellers may charge in any token they describe — read each listing's
  `price`/`token` labels and the seller's own docs.
