Documentation
Introduction
rail0 is a single immutable smart contract for stablecoin payments. It gives a payment the
card-rail lifecycle (authorize → capture → refund, plus void, release and a dispute
signal) with no owner, no fee and no operator in between. The buyer signs once, off-chain;
the merchant submits and pays gas; every captured token reaches the merchant in full.
Two paths
Section titled “Two paths”The contract is all you need: it is permissionless, and anyone can call it. The gateway is a convenience layer, not a gatekeeper. It holds no funds and no keys, and every operation is still signed by the party the contract allows; it just does the chain work a checkout would otherwise carry itself.
Client libraries
Section titled “Client libraries”The API reference shows every call as plain HTTP. To skip the plumbing, two SDKs wrap the gateway’s REST API; both sign locally, so keys never leave your process, and check what they are asked to sign before signing it.
| Install | Source | |
|---|---|---|
| TypeScript (Node 22+) | npm install @commercelayer/rail0-sdk | commercelayer/rail0-ts |
| Ruby (3.0+) | gem install rail0-sdk, then require "rail0" | commercelayer/rail0-ruby |
Building with an AI agent? The rail0 skill
teaches Claude and other agents the payment flows: npx skills add commercelayer/rail0-skill.
Where it runs
Section titled “Where it runs”rail0 runs on any EVM chain that supports the Cancun fork, with any stablecoin that implements EIP-3009. Live deployments, planned mainnets and their stablecoins are listed under Chains in the protocol docs.
Source
Section titled “Source”The contract, its tests and the deployment scripts are at github.com/commercelayer/rail0. No external audit has been completed yet; see the security model for what the contract guarantees and the trade-offs it accepts.