Execute payments
Goal
Send an agent payment with the compliance bundle attached. Confirm the verdict. Handle expected failure modes.
Prerequisites
- An agent at KYA Level 1 or higher.
- A spending policy applied to the agent.
- A funded wallet on the target chain.
Step 1: Send
from oris.errors import OrisPolicyDeny, OrisSanctionsError, OrisRevocationError
try: result = client.payments.send( agent_id=agent.id, to_address="0xA1b2...", amount=12.50, chain="base-sepolia", category="api_consumption", )except OrisPolicyDeny as e: print("policy:", e.rule)except OrisSanctionsError as e: print("sanctions:", e.matched_sources)except OrisRevocationError as e: print("revoked:", e.tier)else: print(result.bundle_id) print(result.tx_hash) print(result.verdict.allow)import { errors } from 'oris-sdk';
try { const result = await client.payments.send({ agentId: agent.id, toAddress: '0xA1b2...', amount: 12.50, chain: 'base-sepolia', category: 'api_consumption', }); console.log(result.bundleId, result.txHash, result.verdict.allow);} catch (e) { if (e instanceof errors.OrisPolicyDeny) console.error('policy:', e.rule); else if (e instanceof errors.OrisSanctionsError) console.error('sanctions:', e.matchedSources); else if (e instanceof errors.OrisRevocationError) console.error('revoked:', e.tier); else throw e;}Step 2: Confirm the on-chain status
The verdict is signed by the L6 verifier. The on-chain transaction hash returns once the network adapter confirms inclusion.
status = client.payments.get(result.bundle_id)print(status.state) # pending / confirmed / failedprint(status.confirmations)const status = await client.payments.get(result.bundleId);console.log(status.state, status.confirmations);Verification
A successful payment leaves an audit log row. Confirm with audit list.
Troubleshooting
OrisPolicyDeny— the policy rejected the payment. Pre-evaluate to find which rule fires.OrisSanctionsError— the counterparty hit a sanctions feed. Thematched_sourcesfield tells you which.OrisRevocationError— either the agent or the counterparty is revoked. Check tier and reason.OrisNetworkError— the network adapter failed (RPC outage, provider quota). Retry with exponential backoff.
Where to go next
- Bundle verification to verify the result independently.
- Spending policies to fine-tune the rules.
- Activity log to inspect the trail.