Provider Guide

Create & Manage Services

How to register your service, set up subscription plans, and integrate payments.

Overview

As a service provider, you can register your service on the protocol and create subscription plans. Users subscribe and pay automatically — you receive USDC directly to your wallet every billing cycle.

No fees. The protocol currently charges 0% commission. All payments go directly to your specified receiver address.

Registering a Service

  1. Connect your wallet and go to the "Service Panel" tab
  2. Enter your Service Name — this is what users will see
  3. Enter the Payment Receiver Address — where USDC payments will be sent
  4. Click "Register Service" and confirm the transaction
Tip: The payment receiver can be any address — your wallet, a multisig, a treasury contract, etc.

Adding Subscription Plans

After registering, add one or more plans to your service:

  1. Enter your Service ID (shown after registration)
  2. Set the Price in USDC (e.g., 10 for 10 USDC)
  3. Choose the Billing Period — Daily, Weekly, Monthly, or Yearly
  4. Select the Payment Token (USDC)
  5. Click "Add Plan" and confirm

You can add multiple plans to the same service (e.g., Basic, Pro, Enterprise tiers).

Gas Sponsorship (Paymaster)

You can sponsor gas fees for your subscribers so they don't pay transaction costs:

  1. In the Service Panel, find the "Paymaster — Gas Sponsorship" section
  2. Enter the amount of LTC to deposit
  3. Click "Deposit to Paymaster"

Your deposit covers gas for all subscribers to your service. Monitor the balance and top up as needed.

Important: If your Paymaster balance runs out, subscribers will need to pay their own gas fees.

Integrating Into Your App

You can verify subscription status on-chain to gate access to your service.

Check if a user is subscribed

// Using ethers.js
const module = new ethers.Contract(
  SUBSCRIPTION_MODULE_ADDRESS,
  ["function isActive(address,uint256) view returns (bool)"],
  provider
);

// Check subscription #0 for a user
const active = await module.isActive(userAddress, 0);
if (active) {
  // Grant access
}

Get subscription details

const sub = await module.getSubscription(userAddress, subscriptionId);

// sub.serviceId — your service ID
// sub.planId — which plan they're on
// sub.active — is it active?
// sub.paused — is it paused?
// sub.lastCharged — timestamp of last payment

Direct subscription links

Send users directly to a specific plan. They'll see a confirmation dialog and subscribe in one click:

<!-- Direct link: serviceId=1, planId=0 -->
<a href="https://your-domain.com/app.html?subscribe=1,0">
  Subscribe Now
</a>

Format: app.html?subscribe={serviceId},{planId}

Embeddable widget

Add a styled subscription button to any website. Just include the widget script and a container element:

<!-- Option 1: Auto-init via data attributes -->
<div id="sub-widget"></div>
<script src="https://your-domain.com/widget.js"
  data-service-id="1"
  data-plan-id="0"
  data-app-url="https://your-domain.com/app.html"
  data-service-name="My Service"
  data-price="10"
  data-period="month"
  data-theme="dark">
</script>
// Option 2: Manual JS init
SubscriptionWidget.render({
  target: '#sub-widget',
  serviceId: 1,
  planId: 0,
  appUrl: 'https://your-domain.com/app.html',
  theme: 'dark', // or 'light'
  serviceName: 'My Service',
  price: '10',
  period: 'month',
  buttonText: 'Subscribe with Crypto'
});
Widget features: Shadow DOM for style isolation, dark/light themes, auto-init from script attributes, customizable button text and branding.

Monitoring Payments

Payments are processed on-chain. You can monitor them by:

Contract Addresses

// LitVM Testnet
ServiceRegistry: check app.js CONTRACTS object
SubscriptionModule: check app.js CONTRACTS object
AccountFactory: check app.js CONTRACTS object
USDC Token: check app.js TOKENS object

Best Practices