# BTC Checkout — Bitcoin Payment Gateway for WooCommerce

A lightweight, self-hosted Bitcoin payment gateway for WooCommerce. Accept BTC payments directly to your own wallet with no third-party fees, no KYC, and no middlemen.

## Features

- **Self-hosted** — Payments go directly to your Bitcoin wallet
- **Lightweight** — Minimal footprint, no external dependencies
- **Real-time verification** — Automatic blockchain payment confirmation via Blockchain.info API
- **QR codes** — BIP-21 compatible QR codes for easy mobile payments
- **Crypto incentives** — Offer discounts to customers who pay with Bitcoin
- **WooCommerce native** — Built on the WC Payment Gateway API, HPOS compatible, block checkout support
- **Secure** — Input sanitization, nonce verification, CSRF protection, rate limiting

## Requirements

- WordPress 6.0 or higher
- WooCommerce 7.0 or higher
- PHP 8.1 or higher

## Installation

1. Upload the plugin ZIP via **Plugins → Add New → Upload Plugin**
2. Activate the plugin
3. Go to **WooCommerce → Settings → Payments → BTC Checkout**
4. Enter your Bitcoin wallet address
5. Enable the gateway

## How It Works

1. Customer selects "Pay with Bitcoin" at checkout
2. Order is placed with "On Hold" status
3. Customer sees payment instructions with exact BTC amount, wallet address, and QR code
4. Plugin automatically checks the blockchain for payment confirmation
5. Order status updates to "Processing" when payment is confirmed

## External Services

This plugin connects to two external services:

- **CoinGecko API** — Real-time BTC/fiat exchange rates ([Terms](https://www.coingecko.com/en/terms), [Privacy](https://www.coingecko.com/en/privacy))
- **Blockchain.info API** — Bitcoin payment verification ([Terms](https://www.blockchain.com/legal/terms), [Privacy](https://www.blockchain.com/legal/privacy))

## License

GPL v2 or later
