On-chain Verification
The exact rules used to accept or reject a payment.
The backend does not blindly trust frontend success messages, wallet UI, or a client-provided transaction status. It fetches the transaction and its receipt from the RPC and evaluates them with a deterministic rule set.
- 1Fetch the transaction by hash from the RPC
- 2Fetch the transaction receipt and the current block number
- 3Reject if the chain ID does not match the invoice
- 4Reject if the token is not the trusted VERSE contract
- 5Reject if the transaction does not exist or reverted
- 6Decode ERC-20 Transfer logs from the receipt
- 7Sum transfers to the merchant wallet
- 8Reject if nothing was sent to the merchant wallet
- 9Require the configured number of confirmations
- 10Compare the received amount to the invoice total (exact / under / over)
Confirmation threshold (production)
VERSE_REQUIRED_CONFIRMATIONS=30An invoice should only transition to PAID after successful server-side verification. The 30-confirmation threshold is probabilistic finality on Polygon, not the Ethereum checkpoint.