🇹🇷 Türkçe dökümantasyon için tıklayın
A modern, secure, and mobile-responsive webhook management system for Buy Me a Coffee, built with pure PHP and JSON database. Monitor all your donations, memberships, and sales in real-time without touching Buy Me a Coffee dashboard.
- Real-time Webhook Handling - Instant notification processing
- HMAC-SHA256 Signature Verification - Secure webhook authentication
- JSON Database - No MySQL/PostgreSQL required, easy backup
- Admin Dashboard - Beautiful and intuitive management panel
- Mobile Responsive - Tailwind CSS powered, works on all devices
- Modern Card Layout - Clean grid-based design instead of tables
- Collapsible Details - Expandable sections for endpoint URL and raw payloads
- Turkish Event Labels - Human-readable event types with emojis
- Color-coded Status - Visual indicators for verified/failed webhooks
- One-Click Actions - Copy endpoint URL, view details, delete entries
Supports all Buy Me a Coffee webhook events:
- ☕ Donations (created, refunded)
- ⭐ Memberships (started, updated, cancelled)
- 🛒 Extra purchases (created, updated, refunded)
- 💼 Commission orders (created, refunded)
- 🌟 Recurring donations (started, updated, cancelled)
- 🎁 Wishlist payments (created, refunded)
- Session-based authentication
- Password-protected admin panel
- HMAC-SHA256 webhook signature verification
- Automatic invalid request rejection
- Rate limiting ready
- PHP 7.4 or higher
- Write permissions for JSON database file
- HTTPS recommended (for production)
git clone https://github.com/bnsware/coffeeping.git
cd coffeepingUpload webhook.php to your web server.
Edit the configuration at the top of webhook.php:
// REQUIRED: Your webhook secret from Buy Me a Coffee
define('WEBHOOK_SECRET', 'your_webhook_secret_key_here');
// REQUIRED: Change the default admin password
define('ADMIN_PASSWORD', 'your_secure_password_here');
// Optional: Customize database filename
define('DB_FILE', 'webhooks.json');Ensure the script can create and write to the JSON database:
chmod 755 /path/to/webhook.php
chmod 755 /path/to/directory- Go to https://www.buymeacoffee.com/webhooks
- Click "Create New Webhook"
- Enter your webhook URL:
https://yourdomain.com/webhook.php?endpoint - Select the events you want to receive
- Copy your Secret Key and update
WEBHOOK_SECRETin the code - Click "Send Test" to verify
Visit your webhook URL without parameters:
https://yourdomain.com/webhook.php
Login with your configured password.
Statistics Cards
- Total webhooks received
- Verified webhooks count
- Today's webhooks
Webhook Cards
- View supporter information
- See donation amounts
- Read messages
- Check verification status
- View detailed payload
- Delete individual webhooks
Actions
- Click "Detay" (Detail) to view full webhook information
- Click "Sil" (Delete) to remove a webhook entry
- Use "Tümünü Temizle" (Clear All) to reset database
- Expand "Webhook Endpoint URL" to copy your endpoint
The system automatically receives webhooks at:
https://yourdomain.com/webhook.php?endpoint
| Event Type | Display Name | Description |
|---|---|---|
donation.created |
☕ Bağış Alındı | New donation received |
donation.refunded |
↩️ Bağış İade Edildi | Donation refunded |
support.created |
☕ Destek Alındı | New support received |
support.refunded |
↩️ Destek İade Edildi | Support refunded |
extra_purchase.created |
🛒 Ekstra Ürün Satışı | Extra item purchased |
extra_purchase.updated |
🔄 Ürün Güncellendi | Purchase updated |
extra_purchase.refunded |
↩️ Ürün İadesi | Purchase refunded |
commission_order.created |
💼 Komisyon Siparişi | Commission ordered |
commission_order.refunded |
↩️ Komisyon İadesi | Commission refunded |
recurring_donation.started |
🌟 Aylık Destek Başladı | Monthly support started |
recurring_donation.updated |
🔄 Aylık Destek Güncellendi | Monthly support updated |
recurring_donation.cancelled |
❌ Aylık Destek İptal Edildi | Monthly support cancelled |
membership.started |
⭐ Üyelik Başladı | Membership started |
membership.updated |
🔄 Üyelik Güncellendi | Membership updated |
membership.cancelled |
❌ Üyelik İptal Edildi | Membership cancelled |
wishlist_payment.created |
🎁 İstek Listesi Ödemesi | Wishlist payment received |
wishlist_payment.refunded |
↩️ İstek Listesi İadesi | Wishlist payment refunded |
You can add custom logic when webhooks are received. Edit the handleWebhook() function:
// Example: Send email on new membership
if ($webhookLog['event_type'] === 'membership.started') {
mail('admin@yoursite.com', 'New Member!', 'Someone subscribed!');
}
// Example: Discord notification
if ($webhookLog['event_type'] === 'donation.created') {
// Send to Discord webhook
$discord_webhook = 'YOUR_DISCORD_WEBHOOK_URL';
// ... your Discord notification code
}
// Example: Add to database
// ... your database insertion codeBy default, the system stores up to 1000 webhooks. To change this:
// In handleWebhook() function
if (count($db['webhooks']) > 1000) { // Change this number
$db['webhooks'] = array_slice($db['webhooks'], 0, 1000);
}- Change Default Password - Never use the default
admin123 - Use Strong Secret - Copy the actual secret from Buy Me a Coffee
- Enable HTTPS - Always use SSL certificate in production
- Restrict File Access - Set proper file permissions (644 for files, 755 for directories)
- Regular Backups - Backup your
webhooks.jsonregularly - Monitor Logs - Check for suspicious webhook activities
your-project/
├── webhook.php # Main system file
├── webhooks.json # Auto-generated database (do not edit manually)
└── README.md # This file
- Check your endpoint URL is correct
- Verify webhook is enabled in Buy Me a Coffee
- Check server error logs
- Ensure file permissions are correct
- Test with "Send Test" button first
- Verify
WEBHOOK_SECRETmatches Buy Me a Coffee - Test webhooks may not have valid signatures (this is normal)
- Try a real donation for testing
- Check for whitespace in secret key
- Verify password is correct in code
- Clear browser cookies
- Check session support is enabled in PHP
- Try incognito/private browsing mode
- Check write permissions on directory
- Ensure disk space is available
- Verify JSON is not corrupted (validate syntax)
- Delete
webhooks.jsonto reset (backup first!)
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- 🐛 Report bugs via GitHub Issues
- 💡 Request features via GitHub Discussions
- ⭐ Star this repo if you find it helpful!
- Built for Buy Me a Coffee platform
- Styled with Tailwind CSS
- Inspired by the need for better webhook management
- ✅ JSON database support
- ✅ Modern card-based UI
- ✅ All event types supported
- ✅ HMAC-SHA256 verification
- ✅ Mobile responsive design
- ✅ Collapsible sections
- ✅ Turkish event labels
- ✅ One-click URL copy
Made with ☕ and ❤️ for the Buy Me a Coffee community