Galliun binds payments to specific requests through cryptographic hashing and on-chain verification.
Request hash binding
The requestHash in a 402 response binds payment to:
- HTTP method and route path
- SHA-256 hash of the request body
- Resolved pricing (model, inference, tool fees)
- Split recipients and amounts (provider + platform fee legs)
- Nonce and expiry timestamp
A payment proof with a mismatched request hash is rejected.
Payer validation
- Payment proof
payermust match the on-chain transaction sender (or fee payer on Solana) - Self-pay is blocked — payer cannot equal any split recipient address
Replay protection
The platform enforces uniqueness on:
chain + network + txHashnonce(single-use per requirement)requestHash(once verified)paymentPayloadHash
Attempting to reuse any of these returns payment_replay or payment_reused.
Nonce and expiry
Each 402 response includes:
nonce— random single-use identifierexpiresAt— ISO timestamp after which the requirement is invalid
Payment proofs must include both values from the original 402.
On-chain verification
After claim, chain adapters verify independently:
- Transaction succeeded on the declared network
- Correct asset (Sui USDC coin type or Solana SPL mint)
- Each split leg received the exact required amount
- Payer matches proof
Client-side security
- Never trust client-supplied payer addresses for authorization
- Do not expose wallet private keys in client code
- Only the payer wallet signs transactions — Galliun never holds user funds
V1 limitations
- Pay-first flow: client pays before API confirms endpoint availability
- Failed execution after verified payment creates a refund recommendation for the provider — Galliun does not issue on-chain refunds
- See Refunds for provider refund policy