px402 · 에이전틱 결제px402 · agentic payments

AI 에이전트를 위한 결제·정산 레이어The payment and settlement layer for AI agents

px402는 PayChain의 Settlement OS 위에서 동작하는 에이전트 결제 레이어입니다. AI 에이전트 커머스를 검증 가능한 정산에 연결합니다.px402 is the agentic payment layer on top of PayChain's Settlement OS. It connects AI-agent commerce to verifiable settlement.

조건부 에스크로Conditional escrow 조건 충족 시에만 정산Settles only when conditions are met
4자 권한 분리Four-party roles 자금 이동과 판정을 분리Moving funds and judging are split
ERC-8183 JobERC-8183 jobs Open → Settled 상태 머신An auditable state machine
검증 가능한 ReceiptVerifiable Receipt Merkle 앵커로 외부 검증Re-verifiable via a Merkle anchor

왜 px402인가Why px402

단순 송금형 결제가 풀지 못하는 문제(분쟁 흡수, AI 작업 검증, 권한 분리, 한국식 정산 주기)를 하나의 결제 표준으로 묶습니다.It unifies what a simple "send money" payment cannot solve (dispute absorption, AI work verification, authority separation, and a Korean-style settlement cycle) into a single payment standard.

에스크로 + 조건부 정산Escrow + conditional release

즉시 송금이 아니라 제3자 에스크로 보관 → 조건 충족 시 지급, 조건 실패 시 환불. 부동산 에스크로 계좌처럼, 분쟁이 생겨도 자금은 아직 중립 보관 상태입니다.Funds sit in third-party escrow instead of transferring instantly: released to the provider when conditions are met, refunded to the buyer when they fail. Like a real-estate escrow account, funds stay neutrally held even when a dispute arises.

4자 권한 분리Four-party authorization silo

Buyer(서명)·Provider(작업)·Facilitator(가스·집행)·Evaluator(품질 판정)로 역할을 분리합니다. 어느 한 주체도 자금 이동과 판정을 동시에 할 수 없어 권한 남용을 막습니다.Roles split across Buyer (signs), Provider (does the work), Facilitator (bears gas / submits), and Evaluator (judges quality). No single party can both move funds and judge, which blocks abuse of power.

Job 라이프사이클 (ERC-8183)Job lifecycle (ERC-8183)

결제와 작업을 Job 상태 머신으로 다룹니다: Open → Funded → Submitted → Completed / Rejected / Expired. Direct·Bounty·Contest 모드를 지원하고, Job 단위 잠금으로 감사 추적이 명확합니다.Payments and tasks run as a Job state machine: Open → Funded → Submitted → Completed / Rejected / Expired. Direct, Bounty, and Contest modes are supported, and per-Job locking keeps the audit trail clear.

AI 작업 검증Verified AI work

결과물 해시(IPFS/Arweave CID) 제출 → 독립 Evaluator가 품질을 판정(예: 유사도 임계값)한 뒤에만 정산됩니다. AI가 실제로 일했는지 객관적으로 확인하는 경로를 표준에 내장했습니다.The provider submits a deliverable hash (IPFS/Arweave CID); settlement happens only after an independent Evaluator judges quality (e.g. a similarity threshold). An objective path to confirm an AI actually did the work is built into the standard.

한국식 정산 모델PG-style settlement

Complete = 즉시 이체가 아니라 원장 적립 + 2단계 출금(요청 → 지연 → 출금). 한국 PG·카드사의 D+1/D+2 정산 관행과 맞춰 분쟁·차지백을 흡수하고 일괄 정산을 가능하게 합니다.Complete means a ledger credit plus a two-step withdrawal (request → delay → withdraw), not an instant transfer. It matches the D+1/D+2 settlement practice of Korean PGs and card networks to absorb disputes/chargebacks and enable batch settlement.

EIP-3009 안전 입금EIP-3009 safe deposit

에스크로는 receiveWithAuthorization 경로를 사용합니다. 수신 컨트랙트가 직접 tx를 제출하므로 서명이 유출돼도 에스크로 주소를 to로 한 서명만 유효합니다. Buyer는 서명만, Facilitator가 가스를 부담하는 가스리스 입금도 지원합니다.The escrow uses the receiveWithAuthorization path: the receiving contract submits the tx itself, so even a leaked signature is only valid with the escrow address as to. Gasless deposit is supported too: the buyer only signs while the facilitator pays gas.

어떻게 동작하나How it works

Job이 열리고, 자금이 에스크로에 잠기고, 작업이 검증된 뒤에 정산됩니다. 모든 단계는 Receipt로 남아 외부에서 다시 확인할 수 있습니다.A Job opens, funds lock in escrow, and settlement happens only after the work is verified. Every step leaves a Receipt that anyone can re-check.

  1. Job 생성·펀딩Create & fund

    Buyer가 Job을 열고 에스크로에 입금합니다. EIP-3009 경로로 Buyer는 서명만 하고 Facilitator가 가스를 부담하는 가스리스 입금도 가능합니다.The buyer opens a Job and funds the escrow. With the EIP-3009 path the buyer only signs while the facilitator pays gas.

  2. 작업·제출Work & submit

    Provider가 작업을 수행하고 결과물 해시(IPFS/Arweave CID)를 제출합니다.The provider does the work and submits a deliverable hash (IPFS/Arweave CID).

  3. 판정Evaluate

    독립 Evaluator가 품질을 판정합니다. 자금 이동과 판정이 분리돼 있어 어느 한쪽도 단독으로 결과를 좌우하지 못합니다.An independent evaluator judges quality. Because moving funds and judging are separated, no single party decides the outcome alone.

  4. 정산·증명Settle & prove

    조건이 충족되면 정산되고, Receipt가 Merkle 배치로 묶여 온체인에 anchor됩니다. 누구나 Merkle 증명으로 결과를 다시 확인할 수 있습니다.On success it settles, and the Receipt is batched into a Merkle tree and anchored on-chain. Anyone can re-check the outcome with a Merkle proof.

개발자 번들Developer bundle

레포 접근 없이 npm tarball로 받는 v0.1 클라이언트 번들. 전부 테스트넷 대상이며, Settlement OS API 키(읽기 전용)는 별도로 전달됩니다.A v0.1 client bundle delivered as npm tarballs, with no repo access required. Everything targets testnet, and the read-only Settlement OS API key is delivered separately.

@paychain/agent-sdk

메인 클라이언트: job.* / receipt.* / account.* / escrow.*. Job 라이프사이클과 Receipt 조회를 한 번에 다룹니다.The main client: job.* / receipt.* / account.* / escrow.*. Handles the Job lifecycle and Receipt queries in one place.

@paychain/cli

paychain 커맨드: Job 생성/펀딩/제출/완료와 Receipt·배치 상태 조회를 터미널에서. PX402_PRIVATE_KEY 미설정 시 읽기 전용으로 동작합니다.The paychain command: Job create/fund/submit/complete and Receipt/batch-status queries from your terminal. Runs read-only when PX402_PRIVATE_KEY is unset.

MCP 서버MCP servers

paychain-mcp(읽기 전용)와 paychain-agent(읽기+쓰기). Claude 등 에이전트에 px402를 직접 연결합니다.paychain-mcp (read-only) and paychain-agent (read + write). Plug px402 straight into agents such as Claude.

@paychain/escrow-sdk

저수준 ABI/calldata 인코더입니다. ERC-8183 / EIP-3009 / ERC-8004 호출을 직접 다뤄야 할 때 사용합니다.A low-level ABI/calldata encoder for ERC-8183 / EIP-3009 / ERC-8004 calls when you need direct control.

@paychain/kit

paychain-kit 프로젝트 스캐폴드입니다. 새 프로젝트에서 SDK 읽기까지 몇 분이면 리허설할 수 있습니다.The paychain-kit project scaffold: go from a fresh project to an SDK read in minutes.

정산 파이프라인Settlement pipeline

온체인 Job 이벤트 → Settlement OS 리스너 → Receipt(SSOT) → Merkle 배치 → anchor. 외부 검증자가 Merkle 증명으로 Receipt 진위를 확인할 수 있습니다.On-chain Job events → Settlement OS listener → Receipt (SSOT) → Merkle batch → anchor. An external verifier can confirm Receipt authenticity with a Merkle proof.

번들·키 발급과 설치·환경 변수 안내는 파트너 퀵스타트에 있습니다. 쓰기(서명) 데모가 필요하면 BWL에 문의하세요. 에스크로 입금과 facilitator 등록이 필요합니다.Bundle/key issuance and install/env setup live in the partner quickstart. For a write (signing) demo, contact BWL: an escrow deposit and facilitator registration are required.

시작하기Get started

파트너 퀵스타트로 시작하세요Start with the partner quickstart

설치 → SDK/CLI 읽기 → 테스트넷 Settlement OS 조회까지, 발행된 파트너 문서를 따라가면 됩니다. 구조와 설계 배경은 px402 개요에서 이어집니다.From install to an SDK/CLI read to a testnet Settlement OS query: follow the published partner doc. The architecture and design rationale continue in the px402 overview.