API reference
Public JSON, no key required. Base URL /api. Merchant ids accept an address in any case or a linked .qie name.
GET
/merchantsEvery registered merchant with name, profile and status.GET
/merchants/:idOne merchant by address or .qie name, with live score breakdown and credit state.GET
/merchants/:id/paymentsSales history: amount, evidence tier, method, pool repayment and transaction hash.GET
/merchants/:id/score-proofCanonical score inputs, their keccak256 hash and the on-chain checkpoint.GET
/merchants/:id/score-historyScore over time, one point per week.GET
/merchants/:id/advancesAdvances with every automatic and manual repayment.GET
/merchants/:id/statement.csvCSV statement. Optional from and to (ISO dates).GET
/merchants/:id/statement.xmlISO 20022 camt.053.001.08 statement.GET
/receipts/:idA single receipt with merchant details.GET
/customers/:wallet/receiptsEvery receipt a customer holds, across all shops.GET
/tractionOrganic network totals and a 30-day daily series.GET
/fxUSD to local currency rates used for display.POST
/relay/saleSubmit a merchant offer and customer confirmation. Gas paid by the relayer.POST
/relay/forwardSubmit a signed ERC-2771 request for sponsored merchant actions.Verify a score in a few lines
- 1. Fetch the score proof for any merchant.
- 2. keccak256 the canonical JSON yourself.
- 3. Read the latest checkpoint from TrustScoreOracle and compare the hashes.
- 4. To go further, rebuild the inputs from PaymentRecorded events and rerun the formula in apps/indexer/src/trust.
verify-score.ts
const proof = await fetch("/api/merchants/mamatiti.qie/score-proof") .then((r) => r.json()); // recompute the hash yourself const hash = keccak256(toBytes(proof.canonical)); // compare with the on-chain checkpoint const [score, , , onChain] = await oracle.read.latestScore([merchant]); console.log(hash === onChain); // true
Contracts on QIE mainnet
Solidity 0.8.20, OpenZeppelin 5, compiled for the berlin EVM target that QIE uses. Source verified on the QIE explorer.
MerchantRegistry
Shops, profiles, QIE Pass attestations and verified .qie names.
PaymentReceipts
Settled and attested sales, soulbound receipts, payWithQIE, auto-repayment routing.
WorkingCapitalPool
On-chain settled volume, credit ladder, advances, repayment and defaults.
TrustScoreOracle
Weekly score checkpoints with the inputs hash.
VerigaForwarder
ERC-2771 forwarder for gas-free merchant actions.
QIE integrations used
QUSDC0x3F43DA…9E5DA5
QIEDEX router0x08cd2e…f553Ef
QIE/USD oracle0x3Bc617…903D17
QIE ID registry0x1D69d7…10f62e
QIE ID reverse resolver0x76ec8e…99171E
Events worth indexing
PaymentRecorded(receiptId, merchant, payer, amount, invoiceRef, timestamp, tier, method, repaidToPool)
MerchantRegistered(wallet, profileURI, createdAt)
MerchantNameLinked(wallet, qieName)
AdvanceRequested(merchant, principal, fee, repayBps, dueAt)
AdvanceRepaid(merchant, from, amount, automatic, remaining)
AdvanceClosed(merchant, wasDefaulted, newLadderStep)
AdvanceDefaulted(merchant, outstanding, markedBy)
ScorePublished(merchant, score, periodId, publishedAt, inputsHash)
Build something on real sales.
Lending, loyalty, bookkeeping or analytics. The data is public and the proofs are on-chain.