Payments
Credit is added with direct on-chain payments on Robinhood Chain (chain ID 4663), in ETH or USDG, straight from your wallet. A payment is an ordinary public transaction to the Sevren payment contract. The payment carries your account's reference, and its full value becomes credit after 900 block confirmations, usually 1 to 2 minutes.
What you need
- A wallet with ETH or USDG on Robinhood Chain. ETH is the chain's gas token too, so a small amount is kept for gas; USDG payments also need enough ETH to pay gas.
- A Sevren account. The payment reference is created on first use and lives on the account page. You do not have to sign in with the paying wallet.
What is accepted
| Asset | How it is credited | Notes |
|---|---|---|
| ETH | At the Chainlink ETH/USD price when it is credited. | The web app shows the current quote before you confirm; the credit uses the price at the moment of crediting. |
| USDG | 1 USDG = $1 of credit. | An ERC-20 approval to the payment contract is required first when the current allowance is too low. |
Your payment reference
Every account has a 32-byte reference (ref). It is created the first time you open the Add credit panel and it never changes. Any wallet that pays with this reference credits your account. Keep it between people you want to let pay for you: the reference is not a password, but it is the only link between a public on-chain payment and your account.
GET /account/payments returns it in ref, along with the contract address, the chain id, the accepted assets and your recent payments.
Payment flow
- Pick ETH or USDG in Add credit and the USD amount (minimum from
minUsd). - Connect a wallet through Privy's wallet connector. The app asks it to switch to Robinhood Chain (chain id 4663), adding the network when the wallet does not know it.
- For USDG, the app reads
allowance(payer, contract). If it is lower than the amount, the wallet sendsapprove(contract, amount)first. - For ETH, the app reads the Chainlink ETH/USD feed through the wallet, computes the wei to send and asks the wallet to call
payNative(ref)with that value. - The contract emits
Paid(ref, payer, token, amount). The payment watcher waits for 900 further blocks and inserts an idempotent record on(chain_id, tx_hash, log_index). The credit event fires in the same transaction.
The payment contract
Solidity 0.8.28, no fallback, no state after external calls. Funds are forwarded to the treasury in the same call; the contract never holds funds. The owner can set minAmount per token, change the treasury and pause the contract. Ownership is two-step.
event Paid(bytes32 indexed ref, address indexed payer, address indexed token, uint256 amount);
event MinAmountSet(address indexed token, uint256 minAmount);
event TreasurySet(address indexed treasury);
event PausedSet(bool paused);
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function payNative(bytes32 ref) external payable;
function pay(address token, uint256 amount, bytes32 ref) external;
function minAmount(address token) external view returns (uint256);
function treasury() external view returns (address);
function paused() external view returns (bool);
function owner() external view returns (address);
function pendingOwner() external view returns (address);
// owner only
function setMinAmount(address token, uint256 min) external;
function setTreasury(address treasury_) external;
function setPaused(bool paused_) external;
function transferOwnership(address newOwner) external;
// pending owner only
function acceptOwnership() external;refmust be non-zero.- Only tokens whose
minAmountis greater than zero are accepted, andamountmust be at least that minimum.address(0)covers native ETH. - Plain ETH transfers to the contract revert: ETH goes only through
payNative.
When credit arrives
Credit arrives after 900 further blocks on Robinhood Chain, usually 1 to 2 minutes after the transaction is included. This is an early confirmation policy, before Ethereum settlement: Sevren accepts the risk that a chain reorganization could remove a credited payment. Chain or RPC delays can make the wait longer. Payments the watcher cannot match to an account (unknown reference, token not accepted, cap exceeded) are recorded as unmatched and need manual review.
Final and public
- Payments are final: credit cannot be withdrawn or refunded. Sevren never signs or forwards your private keys.
- Payments are public on Robinhood Chain. Anyone can see the paying wallet, the amount and the time. Sevren links the payment to the account it credits via the reference.
- The treasury and the owner of the contract are public too. The operator rotates them with the ownership and treasury setters.
See also
- Account API:
GET /account/payments. - Billing: credit, prices, holds and the order of spending.
- Pricing: live model prices and the holder plans.
