스테이블코인 결제 API 문서

공개 테스트넷 베타에서 Ethereum Sepolia와 Base Sepolia의 테스트 USDC, TRON Nile의 테스트 USDT를 사용합니다. 실제 비용은 0원입니다.

테스트 키로 지원 자산 조회

대시보드에서 프로젝트의 테스트 키를 발급하세요. ZERO_TO_ONE_PAY_API_KEY는 서버 환경에 보관합니다. API 주소는 https://api.0to1pay.com이고 HTTP 경로는 /v1에서 시작합니다.

curl --fail-with-body https://api.0to1pay.com/v1/chain/assets \
  -H "Authorization: Bearer ${ZERO_TO_ONE_PAY_API_KEY}"

주문에서 이용권 지급까지

연결에 일회용 수취 주소를 등록하고, 주문과 견적을 생성하세요. 구매자는 송금 전과 거래 해시 제출 시 지갑으로 서명합니다. 웹훅 원문을 서명 검증하고 지급 명령을 영속화한 뒤 워커에서 이용권을 지급하세요. Next.js 예제는 이 흐름을 Base Sepolia에서 실행합니다.

연동 자료

네트워크와 연결

  • GET /v1/chain/assets · 활성 네트워크 및 자산 조회 · payments:read
  • POST /v1/chain/connections · 감시 전용 체인 연결 생성 · connections:manage
  • POST /v1/connections/{connection_id}/chain-recipients · 일회용 수취 주소 등록 · connections:manage
  • GET /v1/connections · 프로젝트 연결 목록 조회 · connections:read
  • GET /v1/connections/{connection_id} · 연결 정보 조회 · connections:read
  • POST /v1/connections/{connection_id}/disable · 연결의 신규 수납 중지 · connections:manage

주문과 견적

  • POST /v1/payments · 주문 결제 생성 · payments:write
  • GET /v1/payments · 프로젝트 결제 목록 조회 · payments:read
  • GET /v1/payments/{payment_id} · 결제·판정·이행 상세 조회 · payments:read
  • GET /v1/payments/{payment_id}/receipt · 자산과 네트워크별 확정 수령액 조회 · payments:read
  • POST /v1/payments/{payment_id}/quotes · 수취 주소 예약 및 결제 조건 확정 · payments:write
  • GET /v1/quotes/{quote_id} · 확정 견적 조회 · payments:read
  • POST /v1/payments/{payment_id}/attempts · 견적의 송금 시도 생성 · attempts:initiate
  • GET /v1/payments/{payment_id}/attempts · 결제 시도 목록 조회 · payments:read
  • GET /v1/attempts/{attempt_id} · 결제 시도 상세 조회 · payments:read
  • POST /v1/payments/{payment_id}/cancel · 신규 결제 시도 중지 · payments:write

지갑 승인과 검증

  • POST /v1/quotes/{quote_id}/chain-intents · 구매자 지갑 서명 요청 생성 · payments:write
  • POST /v1/quotes/{quote_id}/chain-intents/{intent_id}/authorize · 선택한 지갑으로 견적 승인 · payments:write
  • POST /v1/quotes/{quote_id}/chain-intents/{intent_id}/submit · 서명한 거래 증빙 제출 · payments:write
  • POST /v1/payments/{payment_id}/verify · 결제 증빙 검증 요청 · payments:verify
  • POST /v1/payments/{payment_id}/reviews · 감사 기록을 남기는 결제 검토 · payments:review
  • GET /v1/operations/{operation_id} · 작업 결과 조회 · operations:read

웹훅과 이벤트

  • POST /v1/webhook-endpoints · 웹훅 엔드포인트 등록 · webhooks:manage
  • GET /v1/webhook-endpoints/{endpoint_id} · 웹훅 엔드포인트 정보 조회 · webhooks:read
  • POST /v1/webhook-endpoints/{endpoint_id}/rotate-secret · 웹훅 서명 비밀 교체 · webhooks:manage
  • GET /v1/events · 커서로 프로젝트 이벤트 조회 · events:read

상품 이행

  • GET /v1/fulfillments/{command_id} · 이행 명령 및 실행 상태 조회 · fulfillment:read
  • POST /v1/fulfillments/{command_id}/claim · 이행 명령 실행 권한 요청 · fulfillment:execute
  • POST /v1/fulfillments/{command_id}/results · 이행 결과 보고 · fulfillment:results
  • POST /v1/fulfillments/{command_id}/retry-delivery · 동일한 이행 명령 재전송 · fulfillment:retry

구독과 사용량

  • GET /v1/billing/plans · 요금제와 결제 가능한 네트워크·토큰 조회 · billing:read
  • GET /v1/billing/subscription · 구독 및 API 요청 사용량 조회 · billing:read
  • GET /v1/billing/invoices · 최근 구독 청구서 조회 · billing:read
  • POST /v1/billing/invoices · 구독료 청구서와 지갑 서명 요청 생성 · billing:write
  • GET /v1/billing/invoices/{invoice_id} · 구독 청구서 상세 조회 · billing:read
  • POST /v1/billing/invoices/{invoice_id}/authorize · 송금 지갑으로 구독 청구서 승인 · billing:write
  • POST /v1/billing/invoices/{invoice_id}/submit · 서명한 구독 송금 증빙 제출 · billing:write
  • POST /v1/billing/test-keys · 샌드박스 테스트 키 발급 · billing:write
  • POST /v1/billing/keys · 프로젝트 범위의 서버 키 발급 · billing:write
English