Decentralized Payment Processing for Global Contributors
- Overview
- Why Paymentor?
- Supported Payment Methods
- Setup Instructions
- API Reference
- Configuration
- Testing
- Production Deployment
- Troubleshooting
GitForge now uses Paymentor as its primary payment processor, enabling:
- ✅ Decentralized Crypto Payments: Direct wallet-to-wallet transfers (USDC, USDT, ETH, etc.)
- ✅ Global Fiat Support: Bank transfers, ACH, SEPA, SWIFT
- ✅ Zero KYC Friction: Lower barriers to entry for global contributors
- ✅ Multi-Network Support: Ethereum, Polygon, Arbitrum, Optimism, Solana, and more
- ✅ Low Fees: 1% for crypto, 2% for fiat (vs. 2-3% for traditional processors)
- ✅ Instant Settlements: Crypto payments settle in minutes, fiat in 24-48 hours
- ❌ Requires extensive KYC documentation
- ❌ Limited to specific regions
- ❌ High compliance overhead
- ❌ Slow onboarding process
- ❌ Not aligned with Web3/DAO ethos
- ✅ Web3-Native: Built for decentralized payments
- ✅ Global Reach: Supports 150+ countries
- ✅ Lower KYC: Simplified verification for crypto
- ✅ Fast Onboarding: Contributors can start earning immediately
- ✅ Flexible: Crypto, fiat, or hybrid payments
- ✅ Developer-Friendly: Clean API, excellent documentation
| Token | Networks | Use Case |
|---|---|---|
| USDC | Ethereum, Polygon, Arbitrum, Optimism, Solana | Stablecoin, preferred for most payouts |
| USDT | Ethereum, Polygon, Tron, Solana | Alternative stablecoin |
| ETH | Ethereum | For developers who prefer ETH |
| MATIC | Polygon | For Polygon ecosystem contributors |
| SOL | Solana | For Solana ecosystem contributors |
| BNB | Binance | For BSC ecosystem contributors |
Advantages:
- Instant settlement (minutes)
- No bank account required
- Transparent on-chain verification
- Self-custody (contributor controls funds)
| Currency | Region | Method |
|---|---|---|
| USD | Worldwide | ACH, Wire Transfer |
| EUR | Europe | SEPA, SWIFT |
| GBP | UK | Faster Payments, SWIFT |
| NGN | Nigeria | Local Bank Transfer |
| KES | Kenya | M-Pesa, Bank Transfer |
| ZAR | South Africa | EFT, Bank Transfer |
Advantages:
- Traditional banking integration
- No crypto wallet required
- Familiar to non-technical contributors
- Regulatory compliance built-in
- Sign up at Paymentor.io
- Complete business verification
- Generate API keys from dashboard
- Copy your
PAYMENTOR_API_KEY
Create a .env file in the repository root:
# Paymentor Configuration
PAYMENTOR_API_KEY=your_api_key_here
PAYMENTOR_SECRET_KEY=your_secret_key_here
PAYMENTOR_WEBHOOK_SECRET=your_webhook_secret
# Default Payment Settings
DEFAULT_PAYMENT_METHOD=crypto # or 'fiat'
DEFAULT_CRYPTO_TOKEN=USDC
DEFAULT_NETWORK=polygon
DEFAULT_FIAT_CURRENCY=USD
# Fee Configuration
CRYPTO_FEE_PERCENT=1.0
FIAT_FEE_PERCENT=2.0
MIN_PAYOUT_AMOUNT=10
MAX_PAYOUT_AMOUNT=50000Add the following secrets to your GitHub repository:
- Go to Settings > Secrets and variables > Actions
- Add new repository secrets:
PAYMENTOR_API_KEYPAYMENTOR_SECRET_KEYPAYMENTOR_WEBHOOK_SECRET
Update .github/workflows/bounty-payout.yml:
- name: Process Payout with Paymentor
env:
PAYMENTOR_API_KEY: ${{ secrets.PAYMENTOR_API_KEY }}
run: |
node .github/scripts/payout_processor_paymentor.js \
--contributor ${{ github.event.pull_request.user.login }} \
--amount ${{ env.BOUNTY_AMOUNT }} \
--method crypto \
--token USDC \
--network polygonconst paymentor = new PaymentorIntegration(apiKey);
const result = await paymentor.initializePayment({
contributor_username: 'john-developer',
amount: 250,
currency: 'USD',
payment_method: 'crypto',
network: 'polygon',
wallet_address: '0x1234...',
pr_number: 42
});
// Result:
// {
// success: true,
// transaction_id: 'PMT_1234567890',
// status: 'pending',
// payment_url: 'https://paymentor.io/pay/PMT_1234567890',
// expires_at: '2025-11-10T11:32:23Z'
// }const result = await paymentor.processCryptoPayment({
contributor_username: 'jane-designer',
amount: 475,
token: 'USDC',
network: 'polygon',
wallet_address: '0x5678...',
pr_number: 43
});
// Result:
// {
// success: true,
// transaction_id: 'PMT_9876543210',
// tx_hash: '0xabcd...',
// status: 'confirmed',
// amount_sent: 475,
// network: 'polygon',
// token: 'USDC',
// timestamp: '2025-11-10T10:32:23Z'
// }const result = await paymentor.processFiatPayment({
contributor_username: 'ali-raza',
amount: 500,
currency: 'USD',
payment_method: 'ACH',
bank_account: 'xxxx1234',
pr_number: 44
});
// Result:
// {
// success: true,
// transaction_id: 'PMT_1111111111',
// status: 'processing',
// amount_sent: 500,
// currency: 'USD',
// estimated_arrival: '2025-11-11T10:32:23Z',
// timestamp: '2025-11-10T10:32:23Z'
// }const status = await paymentor.getPaymentStatus('PMT_1234567890');
// Result:
// {
// transaction_id: 'PMT_1234567890',
// status: 'confirmed',
// amount: 250,
// currency: 'USDC',
// timestamp: '2025-11-10T10:32:23Z'
// }const rate = await paymentor.getExchangeRate('USD', 'USDC');
// Result:
// {
// from: 'USD',
// to: 'USDC',
// rate: 1.0,
// timestamp: '2025-11-10T10:32:23Z'
// }const verification = await paymentor.verifyWalletAddress(
'0x1234567890123456789012345678901234567890',
'ethereum'
);
// Result:
// {
// address: '0x1234567890123456789012345678901234567890',
// network: 'ethereum',
// valid: true,
// timestamp: '2025-11-10T10:32:23Z'
// }Edit github/BOUNTY_CONFIG.json:
{
"payment_processor": "paymentor",
"default_payment_method": "crypto",
"default_crypto_token": "USDC",
"default_network": "polygon",
"default_fiat_currency": "USD",
"transaction_fee_percent": 1.0,
"min_payout_amount": 10,
"max_payout_amount": 50000,
"auto_convert_to_usd": true
}Store contributor preferences in EQUITY_TRACKING.json:
{
"github_username": "john-developer",
"payment_preferences": {
"method": "crypto",
"token": "USDC",
"network": "polygon",
"wallet_address": "0x1234567890123456789012345678901234567890"
}
}# Test Paymentor integration
node .github/scripts/paymentor_integration.js
# Output:
# 🚀 GitForge Paymentor Integration
# ==================================
#
# Supported Payment Methods:
# {
# "crypto": ["USDC", "USDT", "ETH", "MATIC", "SOL", "BNB"],
# "fiat": ["USD", "EUR", "GBP", "NGN", "KES", "ZAR"],
# "bank": ["ACH", "SEPA", "SWIFT"]
# }
#
# ✅ Paymentor integration ready!
# Mode: MOCK (Testing)# Test payout processing
node .github/scripts/payout_processor_paymentor.js
# Output:
# 💳 Processing payout for @john-developer
# Amount: 250 USD
# Method: crypto
# Fee (1%): $2.50
# Net Amount: $247.50
# ✅ Payout processed successfully!
# Transaction ID: PMT_1234567890_abcdef123The integration automatically detects the environment:
// Mock mode (for testing)
const paymentor = new PaymentorIntegration();
// Uses simulated responses, no API calls
// Production mode (with API key)
const paymentor = new PaymentorIntegration(process.env.PAYMENTOR_API_KEY);
// Makes real API calls to Paymentor# Set API key in GitHub Secrets
PAYMENTOR_API_KEY=pk_live_xxxxxxxxxxxxx# Start with small test payouts
# Monitor transaction status in Paymentor dashboard
# Verify webhook receiptsConfigure webhook in Paymentor dashboard:
Webhook URL: https://github.com/[user]/[repo]/webhooks/paymentor
Events: payment.completed, payment.failed, payment.refunded
- Track transaction fees
- Monitor success rates
- Optimize network selection (Polygon is cheapest for USDC)
- Adjust fee percentages based on volume
- ✅ Store API keys in GitHub Secrets
- ✅ Rotate keys regularly
- ✅ Use separate keys for test and production
- ✅ Never commit keys to repository
- ✅ Always verify wallet addresses before payment
- ✅ Use
verifyWalletAddress()for validation - ✅ Require contributor to confirm wallet in UI
- ✅ Implement rate limiting on wallet changes
- ✅ Log all transactions in
PAYOUT_AUDIT.json - ✅ Include transaction hash for on-chain verification
- ✅ Store webhook receipts for reconciliation
- ✅ Implement dispute resolution process
# Check audit log
cat github/PAYOUT_AUDIT.json | jq '.entries[] | {contributor, amount_usd, status}'# Total fees collected
cat github/PAYOUT_AUDIT.json | jq '.total_fees_collected'
# By payment method
cat github/PAYOUT_AUDIT.json | jq 'group_by(.payment_method) | map({method: .[0].payment_method, count: length, total_fees: map(.fee_usd) | add})'Solution:
- Verify wallet format (0x... for Ethereum, different for other chains)
- Use
verifyWalletAddress()before payment - Check network compatibility
Solution:
- Check GitForge account balance in Paymentor dashboard
- Fund account with crypto or fiat
- Set up auto-funding if available
Solution:
- Check
SUPPORTED_NETWORKSfor token - Use default network (Polygon recommended)
- Contact Paymentor support for network additions
Solution:
- Verify webhook URL in Paymentor dashboard
- Check GitHub webhook logs
- Ensure firewall allows Paymentor IPs
- Test webhook manually in Paymentor dashboard
- Paymentor Docs: https://docs.paymentor.io
- Paymentor Support: support@paymentor.io
- GitForge Issues: https://github.com/asymcrypto/gitforge-template/issues
- Discord: GitForge Community
If you were previously using Flutterwave:
- Migrate existing payouts: Contact Paymentor support for bulk migration
- Update contributor data: Add wallet addresses to contributor profiles
- Test new workflows: Run full test suite before production
- Communicate changes: Notify contributors of new payment options
- Maintain audit trail: Ensure all historical data is preserved
- Multi-sig wallet support for security
- Automated staking/yield generation
- Recurring payment subscriptions
- NFT-based contributor badges
- DAO treasury integration
- Cross-chain bridge support
Built with ❤️ for decentralized teams
Paymentor powers GitForge's global payment infrastructure