A Chrome extension that enhances online shopping by detecting supported merchants and offering seamless crypto payments via Bitrefill gift cards.
- Automatic Merchant Detection: Detects when you're browsing a supported merchant website
- Location-Based Product Filtering: Automatically detects your country from the domain TLD
- Real-Time Gift Card Delivery: Instantly receive gift card codes after payment
- Multiple Cryptocurrency Support: Pay with Bitcoin, Lightning, Ethereum, and more
- Seamless Integration: Floating checkout button that appears on supported sites
- Modern UI: Beautiful, responsive interface with smooth animations
- Bitrefill API Token: Get your API token from Bitrefill Developers
- Chrome Browser: Version 88 or higher (Manifest V3 support)
-
Clone or Download this repository to your local machine
-
Load Extension in Chrome:
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the extension folder
- Open Chrome and go to
-
Configure API Token:
- Click the extension icon in your browser toolbar
- Enter your Bitrefill API token in the setup section
- Click "Save Token" and test the connection
-
Start Shopping:
- Visit any supported merchant website (e.g., amazon.com, adidas.com)
- Look for the floating "Pay with Crypto" button
- Click to browse available gift cards and complete your purchase
The extension automatically detects and supports merchants that have gift cards available on Bitrefill, including:
- Retail: Amazon, Walmart, Target, Best Buy
- Fashion: Adidas, Nike, H&M, Zara
- Food & Dining: Starbucks, McDonald's, Subway
- Entertainment: Netflix, Spotify, iTunes
- Gaming: Steam, PlayStation, Xbox
- And many more...
- Extracts domain name from current website URL
- Searches Bitrefill API for available gift cards
- Injects checkout button if supported
- Analyzes top-level domain (TLD) for country code
- Filters products by country for better relevance
- Supports major countries: US, UK, SG, CA, AU, DE, FR, etc.
- Step 1: Select gift card product
- Step 2: Choose denomination and payment method
- Step 3: Pay with cryptocurrency
- Step 4: Receive gift card instantly
- Real-time delivery of gift card codes
- Copy-to-clipboard functionality
- Direct merchant website integration
- Email backup delivery
The extension integrates with Bitrefill's API endpoints:
GET /products/search- Search for available gift cardsPOST /invoices- Create payment invoicesGET /invoices/{id}- Check payment statusGET /orders/{id}- Retrieve gift card details
Access settings through the extension popup:
- Default Payment Method: Choose your preferred cryptocurrency
- Auto-detect Country: Enable/disable automatic country detection
- API Token Management: Update or test your API connection
- Bitcoin (BTC)
- Lightning Network
- Ethereum (ETH)
- Litecoin (LTC)
- And more supported by Bitrefill
BitrefillExtension/
├── manifest.json # Extension manifest
├── background.js # Service worker
├── content.js # Content script
├── content.css # Content styles
├── popup.html # Popup interface
├── popup.css # Popup styles
├── popup.js # Popup logic
├── modal.html # Payment modal
├── modal.css # Modal styles
├── modal.js # Modal logic
├── icons/ # Extension icons
└── README.md # This file
- Background Script: Handles API calls and extension state
- Content Script: Detects merchants and injects UI
- Popup: Extension configuration and status
- Modal: Complete payment flow interface
- Create Icons: Add icon files (16x16, 48x48, 128x128) to the
icons/directory - Test Thoroughly: Test on various merchant websites
- Package Extension: Zip the extension folder for distribution
"API token not configured"
- Ensure you've entered your Bitrefill API token correctly
- Test the connection using the "Test Connection" button
"No gift cards available"
- The merchant may not be supported in your region
- Try changing your country setting or visiting a different merchant
"Payment failed"
- Check your cryptocurrency wallet has sufficient funds
- Ensure you're sending the correct amount to the provided address
- Verify the payment method is supported
Extension not working
- Refresh the webpage and try again
- Check the browser console for error messages
- Ensure the extension is enabled in Chrome
Enable debug logging by opening the browser console and looking for messages starting with "Bitrefill:"
- API tokens are stored locally in Chrome's secure storage
- No sensitive data is transmitted to third parties
- All API calls are made directly to Bitrefill's secure endpoints
- Payment addresses are generated securely by Bitrefill
- The extension only accesses websites you visit
- No browsing data is collected or stored
- API calls are limited to Bitrefill's endpoints
- Location detection is based on domain TLD only
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Extension Issues: Open an issue on GitHub
- Bitrefill API: Contact Bitrefill support
- General Questions: Check the troubleshooting section above
- Initial release
- Basic merchant detection
- Payment flow implementation
- Gift card delivery
- Multi-cryptocurrency support
- User account integration
- Payment history tracking
- Bulk gift card purchases
- Advanced merchant detection
- Mobile app companion
- Additional payment methods
- Localization support
- Advanced analytics
Note: This extension requires a valid Bitrefill API token to function. Get yours at https://www.bitrefill.com/account/developers