Developer Portal

Everything you need to build with Virio

SDKs, interactive API references, event schemas, and copy-paste examples. Ship onchain billing without becoming a payments team.

Quickstart

Install a package, drop in your key, and make your first call. Every SDK is typed end-to-end and tree-shakeable.

@virio/sdk
Core TypeScript SDK
18 kB
@virio/react
React hooks & components
9 kB
@virio/contracts
Solidity interfaces & ABIs
1npm install @virio/sdk @virio/react
2 
3# then set your key
4export VIRIO_KEY=pk_test_8f3c2a4c91d4e2a7b6c5d8e9

Keys & API reference

Manage keys, copy your environment variables, and try every endpoint live — responses are returned inline.

API keys

rotate anytime — old keys revoke instantly
Test modepk_test_8f3••••••••••••••••
Live modepk_live_1b7••••••••••••••••

Environment variables

VIRIO_KEY=pk_test_8f3c2a4c91d4e2a7b6c5d8e9
VIRIO_WEBHOOK_SECRET=whsec_3d44b8e1a2b3c4d5
VIRIO_ENV=test
Create a subscription product

Copy-paste examples

React, Next.js, Solidity, and webhook payloads — ready to drop in.

Subscribe.tsx
1import { useVirioCheckout } from "@virio/react";
2 
3export function Subscribe({ planId }: { planId: string }) {
4 const { subscribe, status } = useVirioCheckout(planId);
5 return (
6 <button onClick={subscribe} disabled={status === "pending"}>
7 {status === "active" ? "Subscribed" : "Subscribe — $49/mo"}
8 </button>
9 );
10}

Execution lifecycle

Every subscription and payroll run follows the same five stages.

1
createProduct / payroll defined
2
approveCustomer signs once
3
scheduleAgreement becomes due
4
executeExecutor triggers settlement
5
settleFees split, funds delivered

Event schemas

Webhook event types delivered to your endpoint.

subscription.chargedA recurring charge settles
subscription.failedA charge reverts onchain
subscription.cancelledAn agreement is cancelled
payroll.executedA payroll run completes
executor.reward.paidAn executor is paid its fee

Ready to go live?

Spin up the dashboard, create a product, and start settling onchain.

Launch dashboard