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
- Sign in to the amser dashboard and connect your wallet
- Deploy a SubscriptionModule from the dashboard
- Create one or more Plans with pricing and intervals
- Share the hosted checkout link with your users — it handles wallet connection, Permit2 approval, and subscription signing in one flow
- Keepers automatically execute payments on schedule
- 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
- Sign in to the amser dashboard and connect your wallet
- Deploy a CreditModule from the dashboard
- Create Plans defining batch size and price
- Users allocate credits to a service or agent via Permit2
- The service consumes credits off-chain, submitting vouchers to checkpoint
- 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:
- Execution Model — How keepers find and execute payments
- Incentives & Fees — Fee structure and economics
- Deterministic Assignment — Future keeper assignment model
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(or127.0.0.1/::1) javascript:anddata:URLs are rejected
- Production requires an
- The hosted page appends:
theme(optional):lightordarkbranding mode for the hosted page. Defaults todark.
Example:
https://app.amser.io/subscribe/0x1234...abcd/1?redirect=https%3A%2F%2Fmerchant.example%2Fbilling%2Fcomplete&theme=light
Contract Addresses
amser is currently deployed on testnets. Mainnet addresses will be published after audit completion.
| Contract | Sepolia | Base Sepolia |
|---|---|---|
| RAIModuleFactory | TBD | TBD |
| PaymentProcessor | TBD | TBD |
| Permit2 | 0x000000000022D473030F116dDEE9F6B43aC78BA3 | 0x000000000022D473030F116dDEE9F6B43aC78BA3 |
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
IAuthorizationModuleinterface - 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
- GitHub Issues — Bug reports and feature requests
- Discord — Community support
Next Steps
- Merchant Integration — Full end-to-end setup walkthrough
- Core Concepts — Understand how authorization, subscriptions, and credits work
- API Reference — Endpoint documentation for the Indexer API
- Troubleshooting — Common issues and remediation steps