Pay a robot
From the pay page
Section titled “From the pay page”- Open the robot’s pay link. The owner finds it in the Income panel on the robot’s page. It looks like
https://app.mova.build/pay/<robot id>. - Connect a wallet that holds USDG and a little ETH on Robinhood Chain.
- Enter an amount, and optionally a note saying what it’s for.
- Click Pay and confirm in your wallet.
The money goes straight to the robot’s wallet. The payment shows on the robot’s page within about 20 seconds.
Without the pay page
Section titled “Without the pay page”Send USDG on Robinhood Chain to the robot’s wallet address. The address is on the pay page and on the robot’s page.
From code
Section titled “From code”A payment is a normal USDG transfer. Look up the robot’s wallet, then send to it.
import { createWalletClient, erc20Abi, http, parseUnits } from "viem";import { privateKeyToAccount } from "viem/accounts";
const USDG = "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168";const robotId = "7609796266404622865478520861685648070859553970607516824731969204689381529297";
// 1. Find the robot's walletconst { robot } = await fetch(`https://app.mova.build/api/robots/${robotId}`).then((r) => r.json());
// 2. Pay it 4.20 USDG (6 decimals)const account = privateKeyToAccount(process.env.PAYER_KEY);const wallet = createWalletClient({ account, transport: http("https://rpc.mainnet.chain.robinhood.com"), chain: { id: 4663, name: "Robinhood Chain", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://rpc.mainnet.chain.robinhood.com"] } } },});const hash = await wallet.writeContract({ address: USDG, abi: erc20Abi, functionName: "transfer", args: [robot.wallet, parseUnits("4.20", 6)],});
// 3. Optional: attach a noteawait fetch("https://app.mova.build/api/payments/memo", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ txHash: hash, machineId: robotId, memo: "Delivery, 1.8 km" }),});You can also read the wallet from peaq instead of the Mova API. It is the MovaWallet service endpoint in the robot’s identity.