This document explains how to implement the goodwill-based payment system for MDViewer.
The payment system follows an indie, goodwill-driven philosophy:
- MDViewer is completely free with no feature restrictions
- Users can optionally show appreciation with support tiers: $0, $1, $2, $5, or $10
- No license keys, no DRM, no upselling
- Transparent, trust-based approach
/pricingpage with clean tier selection/download-accesspage with warm, personalized messaging- Navigation integration across the website
- Responsive design for all devices
- Demo payment flow (simulated)
- Stripe integration via Cloudflare Worker
- Real payment processing
- Analytics/tracking (optional)
The current implementation works in demo mode:
- Visit
/pricing.html - Select any support tier ($0-$10)
- See personalized thank you message on
/download-access - Download MDViewer with appropriate messaging
- Create a Stripe account
- Get your API keys from the Stripe Dashboard
- Note your publishable key and secret key
- Create a new Cloudflare Worker at workers.cloudflare.com
- Copy the code from
cloudflare-worker.js - Set environment variables:
STRIPE_SECRET_KEY: Your Stripe secret keySTRIPE_WEBHOOK_SECRET: Your webhook signing secret (optional)
- Deploy the worker
- Note your worker URL (e.g.,
https://mdviewer-payments.your-domain.workers.dev)
Replace the demo supportWithStripe function in pricing.html:
function supportWithStripe(amountCents) {
fetch('https://mdviewer-payments.your-domain.workers.dev/api/create-checkout', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ amount: amountCents })
})
.then(response => response.json())
.then(data => {
if (data.url) {
window.location.href = data.url;
} else {
alert('Payment setup failed. Please try again.');
}
})
.catch(error => {
console.error('Payment error:', error);
alert('Payment setup failed. Please try again.');
});
}- Use Stripe's test mode initially
- Test each payment tier ($1, $2, $5, $10)
- Verify success/cancel redirects work correctly
- Test the $0 (free) tier flow
- Switch Stripe to live mode
- Update API keys in Cloudflare Worker
- Test once more with real (small) payment
- Monitor for any issues
Create pre-configured Stripe Checkout links for each tier:
<!-- Replace JavaScript with direct links -->
<a href="https://checkout.stripe.com/pay/cs_live_..." class="support-btn paid">
Support with $2
</a>Use Stripe's embed buttons for each tier (simpler but less flexible).
Consider services like:
- GitHub Sponsors
- Buy Me a Coffee
- Ko-fi
- PayPal Donate buttons
User visits /pricing
↓
Selects support tier ($0-$10)
↓
[If $0] → Direct to /download-access?tier=free
[If >$0] → Stripe Checkout → Success → /download-access?tier=paid&amount=X
↓
Personalized thank you message
↓
Download links with appropriate messaging
- Clear "no strings attached" messaging
- Prominent $0 option
- No feature limitations
- Transparent about what payments support
- One-click tier selection
- Minimal form fields
- Fast checkout process
- Warm, personal thank you messages
- Cloudflare Workers = fast, global edge computing
- Stripe = secure, reliable payment processing
- No server maintenance required
- Scales automatically
Track (anonymously) via Cloudflare Workers:
- Payment tier preferences
- Geographic distribution
- Conversion rates
- User feedback
This payment system embodies:
- Gratitude over obligation - Support is appreciated, not required
- Transparency - Clear about where money goes
- Simplicity - Easy to understand and use
- Trust - No hidden fees or surprise charges
- Community - Building a sustainable indie software ecosystem
- Monitor Stripe dashboard for payments
- Update download links when new versions release
- Review and respond to user feedback
- Keep Cloudflare Worker updated
- Analyze payment patterns to understand user preferences
- Consider adjusting messaging based on user feedback
- Update pricing tiers if needed (rare)
- Ensure security best practices
- Payment processing handled by Stripe (PCI compliant)
- No personal data stored beyond what Stripe requires
- Consider adding privacy policy link
- Terms of service may need payment section
- User satisfaction (feedback, reviews)
- Sustainable funding for development
- Community growth
- Feature adoption rates
- Support ticket quality/quantity
This payment system represents a different approach to software monetization - one based on trust, transparency, and community support rather than artificial scarcity or feature gates.