Quickstart
This walks through a first payment on Base Sepolia, the Base test network. Testnet funds are free and have no value.
1. Create a wallet
ros2 run robopay_core robopay wallet create --label my-robot
You will be asked for a passphrase twice. It encrypts the private key on disk and cannot be recovered if lost. Store it in a password manager.
The command prints the wallet address. The encrypted key file is written to
~/.robopay/wallets/<address>.json with owner-only permissions.
2. Fund it
ros2 run robopay_core robopay fund <your-address>
This prints a QR code and links to the Base Sepolia faucets, then waits and reports when funds arrive. A wallet needs two things:
USDC, the money it pays with.
A small amount of ETH, to pay network fees (“gas”). A fraction of a cent per transaction on Base.
Check the balance at any time:
ros2 run robopay_core robopay balance <your-address>
3. Start the payment node
ros2 run robopay_core payment_node --ros-args \
-p backend:=self_custody -p chain:=base-sepolia
The node asks for the wallet passphrase, unlocks the key in memory, and starts serving the robopay services and actions. See Passphrase handling for running it without a prompt.
4. Preview a payment
Before sending, ask whether a payment would succeed. This costs nothing.
ros2 service call /transfer/preview robopay_interfaces/srv/TransferPreview \
"{from_address: '<your-address>', to_address: '<their-address>', amount: '0.01', asset: 'USDC'}"
The response reports balances, estimated fee, and whether the spending caps allow it.
5. Pay on a condition
The example below watches a std_msgs/Bool topic and pays the moment it goes
true.
ros2 run robopay_examples pay_on_condition --ros-args \
-p from_address:="'<your-address>'" \
-p to_address:="'<their-address>'" \
-p amount:="'0.01'"
Trigger it:
ros2 topic pub --once /delivery_confirmed std_msgs/Bool "{data: true}"
The example node logs the transaction hash. Paste it into sepolia.basescan.org to see the payment settle.
Note
Addresses and amounts are passed with extra quotes ("'0x...'"). Without
them, ROS parses hex addresses and decimals as numbers.