Skip to main content

Getting Started

This guide walks through the key integration paths for amser.

Before You Start

  • Contract addresses for all supported networks are on the Smart Contracts page
  • Authenticate server-side requests with an API Key
  • Subscribe to state changes via Webhooks

Choose Your Path

I want to accept recurring payments

  1. Sign in to the amser dashboard and connect your wallet
  2. Deploy a SubscriptionModule from the dashboard
  3. Create one or more Plans with pricing and intervals
  4. Share the hosted checkout link with your users — it handles wallet connection, Permit2 approval, and subscription signing in one flow
  5. Keepers automatically execute payments on schedule
  6. Monitor subscriber state and analytics from the dashboard, or query the API server-side

Key concepts: Subscriptions, PaymentProcessor, Hosted Checkout

I want to offer usage-based billing

  1. Sign in to the amser dashboard and connect your wallet
  2. Deploy a CreditModule from the dashboard
  3. Create Plans defining batch size and price
  4. Users allocate credits to a service or agent via Permit2
  5. The service consumes credits off-chain, submitting vouchers to checkpoint
  6. Keepers trigger payment when credits exhaust

Key concepts: Usage Credits, Voucher Settlement

I want to gate access based on subscription status

Once your plans are live, use the IAuthorizationModule interface to check authorization state on-chain:

import {IAuthorizationModule} from "@amser/contracts/interfaces/IAuthorizationModule.sol";

contract MyGatedContract {
IAuthorizationModule public subscriptionModule;
uint256 public requiredPlanId;

modifier onlyActiveSubscribers() {
require(
subscriptionModule.isActive(msg.sender, requiredPlanId),
"Not authorized"
);
_;
}

function premiumFeature() external onlyActiveSubscribers {
// Only callable by active subscribers
}
}

You can also check subscription status off-chain via the API or webhooks.

Example: SubscriptionGatedNFT

I want to run a keeper node

Keepers execute due payments and earn fees. See the Keeper Network documentation for:

Hosted Checkout

Merchants can send subscribers directly to the hosted checkout page to complete wallet connection, Permit2 approval, and subscription signing without requiring dashboard login.

URL format:

https://app.amser.io/subscribe/<moduleAddress>/<planId>?redirect=<url>&theme=<light|dark>

Query params:

  • redirect (optional): URL to return the subscriber to after a successful subscription.
    • The hosted page appends:
      • subscription_id=<id>
      • tx_hash=<hash>
    • Security rules:
      • Production requires an https:// URL
      • Local development can use http://localhost (or 127.0.0.1 / ::1)
      • javascript: and data: URLs are rejected
  • theme (optional): light or dark branding mode for the hosted page. Defaults to dark.

Example:

https://app.amser.io/subscribe/0x1234...abcd/1?redirect=https%3A%2F%2Fmerchant.example%2Fbilling%2Fcomplete&theme=light

Contract Addresses

Testnet Only

amser is currently deployed on testnets. Mainnet addresses will be published after audit completion.

ContractSepoliaBase Sepolia
RAIModuleFactoryTBDTBD
PaymentProcessorTBDTBD
Permit20x000000000022D473030F116dDEE9F6B43aC78BA30x000000000022D473030F116dDEE9F6B43aC78BA3

Integration Checklist

For Merchants

  • Sign in to the dashboard and deploy your module
  • Create plans with appropriate pricing and intervals
  • Share the hosted checkout link or integrate it in your frontend
  • Set up webhooks for payment and subscription state changes
  • Configure webhook endpoint and verify signature verification is working
  • Generate an API key for server-side integration
  • Test full cycle: subscribe → payment → renewal

For Usage-Based Billing

  • Deploy CreditModule with appropriate batch sizes
  • Implement voucher signing (user + merchant)
  • Track credit consumption off-chain
  • Submit checkpoints periodically
  • Handle settlement and replenishment flow

For Gating

  • Import IAuthorizationModule interface
  • Call isActive(subscriber, planId) before gated actions
  • Handle inactive state gracefully (revert or fallback)

SDK (Coming Soon)

A TypeScript SDK is in development for:

  • Module deployment
  • Plan creation
  • Subscription management
  • Credit allocation
  • Voucher generation and signing
  • Indexer queries

Support

Next Steps