Challenge
The API returns `PAYMENT-REQUIRED` with network, asset, amount, receiver, memo, expiry, and resource scope.
HTTP 402 for HBAR and HTS
A pay.sh-style gateway for agents and APIs: request, quote, pay on Hedera, verify through Mirror Node, then unlock the response.
Research result
The API returns `PAYMENT-REQUIRED` with network, asset, amount, receiver, memo, expiry, and resource scope.
WalletConnect or a capped CLI wallet submits a Hedera transfer transaction using HBAR or an HTS fungible token.
The gateway checks Mirror Node records for `SUCCESS`, memo, recipient, amount, token id, timestamp, and payer debit.
Replay-safe proof unlocks the protected response. A receipt header closes the loop for agents and logs.
Built MVP
The shipped core validates invoices against mocked Mirror Node transaction records. It rejects expired invoices, wrong memos, underpayments, payer mismatches, and replayed transaction ids.
verifyPayment({
challenge,
payment,
mirrorNode,
replayStore
})
// confirms:
// SUCCESS tx
// memo == invoice
// payTo received amount
// token id matches
// proof not replayed
Ship path