본문으로 바로가기
Time to read: 1 min

Automate Payments

Programmable payments on Rootstock are normal EVM contracts with Bitcoin-anchored finality. Gas costs and confirmation time depend on network load and how you batch work. USDRIF, RIF Relay, and HTTP 402 style flows each solve different jobs; pick the stack that matches your product and disclose fees and settlement time to users.

Core pillars

PillarDescriptionWhere to go
x402 and agentic commerceMachine clients pay for HTTP resources with on-chain settlement.Integrating x402 Payments with Rootstock
ERC-20 and rBTCFungible tokens and native rBTC for checkout, escrow, and streaming.Contract patterns in your stack (Hardhat, Foundry) plus RIF Relay when you need sponsored gas.

Key concepts

1. ERC-20 assets

ERC-20 tokens work on Rootstock the same way as on other EVM chains. Wallets and indexers you already use apply, but you must verify token addresses per network (mainnet vs testnet).

2. Native rBTC payments

rBTC is the native gas token and is pegged 1:1 to BTC through the PowPeg. Users need rBTC for gas unless you sponsor fees with RIF Relay or a similar paymaster pattern.

3. Programmable money

Contracts can hold funds, release them on conditions, or stream them over time. You still need clear failure handling, upgrade policies, and user messaging when a payment path reverts.

Tools

  • Hardhat / Foundry: Write and test payment and escrow contracts.
  • RIF Relay SDK: Sponsored or token-paid gas for end users.
  • Explorers and indexers: Confirm settlement and build support tooling.

Implementation guides

Integrating x402 Payments

Build a decentralized pay-per-use API on Rootstock using the x402 protocol standards. This guide covers implementing a Sovereign Mode Node.js server that verifies on-chain tRBTC payments directly.

최종 수정: 작성일: 작성자: Owanate Amachree