Commit the policy
Define the claims that must be true before a payment may settle. The condition is canonicalized and hashed before funding.
POLICY HASHBuild applications where money moves only when the right conditions are proven. Settleva gives developers a reusable policy, evidence-verification and USDC settlement layer.
Stop rebuilding escrow logic every time your app needs a conditional payment.
Define the policy once. Connect credible evidence. Reuse the settlement flow.Settleva separates what should happen from how the payment is secured, verified and completed.
Define the claims that must be true before a payment may settle. The condition is canonicalized and hashed before funding.
POLICY HASHAn appropriate provider supplies evidence. Settleva checks the provider, condition binding, verified claims and replay status.
EVIDENCE + CONTEXTThe Settleva contract holds USDC under a payment record and enforces expiry, authorization and one-time settlement.
ON-CHAIN ESCROWFunds are released only with valid settlement authorization. If the payment expires under the contract rules, eligible refunds remain available.
RELEASE OR REFUNDDifferent products have different proof requirements. They can still use the same conditional settlement contract.
Explore a guided example or switch to developer mode to edit the policy and evidence payload. Run it, inspect failures and reset to a working example—no wallet required.
Demo event: Milestone accepted. Turn on developer mode to edit the policy or evidence.
Run a scenario to evaluate the policy against its evidence.
Powered by the same Settleva condition canonicalizer and evaluator used in the repository. External evidence and on-chain settlement are intentionally not simulated as real.
Settleva is infrastructure, not another destination your users have to adopt. Add conditional payments to the app you already operate.
Canonical policy data becomes a stable hash bound to the payment.
Evidence verification and replay protection stay out of the browser.
The shared contract holds USDC and enforces the authorized payment transition.
import { prepareCreatePayment } from "@settleva/sdk";
import type { PaymentCondition } from "@settleva/conditions";
import { parseUnits } from "viem";
import { settlevaAbi } from "./contracts";
// Assumes payer, payee, token, account, wallet and SETTLEVA_ADDRESS
// are configured by your application before this flow runs.
const condition: PaymentCondition = {
version: "1.0",
provider: "your-evidence-provider",
providerVersion: "1",
claims: [
{ field: "milestone.status", operator: "equals", value: "accepted" }
],
expiresAt: Math.floor(Date.now() / 1000) + 86_400
};
const payment = prepareCreatePayment({
payer, payee, token, amount: "25",
expiry: condition.expiresAt, condition
});
await wallet.writeContract({
account,
address: SETTLEVA_ADDRESS,
abi: settlevaAbi,
functionName: "createPayment",
args: [payment.paymentId, payee, token,
parseUnits("25", 6), BigInt(condition.expiresAt),
payment.conditionHash, payment.providerHash]
});A successful API response alone is not a cryptographic proof. Settleva binds verified claims to the committed condition and payment before the contract accepts settlement authorization.
Evidence is checked against the condition committed at funding time.
Proof identifiers and verification sessions cannot authorize duplicate settlement.
The current release flow relies on a backend verification signer. It is not presented as trustless on-chain proof verification.
Contract state controls release eligibility and refund timing.
Start with the playground, inspect the SDK and see how policies become payment commitments.