v1.0.0

Documentation

Everything you need to integrate subscriptions into your Base app

Widget Integration

Add crypto subscriptions to ANY website - WordPress, Shopify, Webflow, or custom HTML - with just 2 lines of code. Perfect for non-technical merchants.

✨ What You Get:

  • ✓ No coding knowledge required
  • ✓ Works on ANY website platform
  • ✓ Payments go directly to your wallet
  • ✓ First payment processes immediately
  • ✓ Automatic recurring billing every 30 days
  • ✓ Users can cancel anytime on-chain
1

Add the Widget Script

Add this script tag to your HTML (before closing </body> tag):

<script src="https://subflo.xyz/widget/subflo-widget.js"></script>
2

Add Your Subscribe Button

Customize with YOUR details and place wherever you want the button:

<div 
  data-subflo-merchant="YOUR_WALLET_ADDRESS"
  data-subflo-amount="10"
  data-subflo-product="Premium Plan"
  data-subflo-interval="2592000"
  data-subflo-button-text="Subscribe Now"
  data-subflo-button-style="green"
></div>

Configuration Options

Required Attributes

data-subflo-merchant

Your wallet address where payments will be sent

data-subflo-amount

Price in USDC (e.g., "10" = $10 USDC)

data-subflo-product

Name of your product or service

data-subflo-interval

Billing cycle in seconds

Optional Attributes

data-subflo-button-text

Custom button text (default: "Subscribe Now")

data-subflo-button-style

Button color: "blue", "green", "purple", or "black"

Common Billing Intervals

86400 = 1 day
604800 = 7 days
2592000 = 30 days
31536000 = 365 days

Complete Example

Here's a full HTML page with SubFlo widget:

<!DOCTYPE html>
<html>
<head>
  <title>My Product</title>
</head>
<body>
  <h1>Subscribe to Premium Plan</h1>
  <p>Get unlimited access for just $10/month!</p>

  <!-- SubFlo Widget -->
  <script src="https://subflo.xyz/widget/subflo-widget.js"></script>
  <div 
    data-subflo-merchant="0xYourWalletAddress"
    data-subflo-amount="10"
    data-subflo-product="Premium Plan"
    data-subflo-interval="2592000"
    data-subflo-button-text="Subscribe with Crypto"
    data-subflo-button-style="green"
  ></div>

</body>
</html>

How It Works

  1. 1User clicks button - Modal opens with subscription details
  2. 2Connect wallet - MetaMask or Coinbase Wallet
  3. 3Approve USDC - One-time approval for SubFlo contract
  4. 4First payment - Processes immediately when subscription created
  5. 5Recurring payments - Automated every 30 days (or your interval)
  6. 6You receive payment - Directly to your wallet (97.5% after 2.5% fee)

🚀 Ready to Go Live?

  1. 1. Copy the code above
  2. 2. Replace YOUR_WALLET_ADDRESS with your Base wallet
  3. 3. Customize amount, product name, and interval
  4. 4. Paste into your website HTML
  5. 5. Test with a small amount first!
  6. 6. Monitor in your dashboard