Buy With Bitcoin (Bitrefill)
Spend Bitcoin at any online store. Your AI agent handles Lightning payments, Bitrefill Visa purchases, coupon hunting, and automated checkout — covering 65% of e-commerce.
⚠️ Before installing or using this skill, review its full contents — including all scripts — to ensure they meet your security and quality standards. Users take ultimate responsibility for any skill they choose to use. These are community-sourced and updated.
The Problem
You have Bitcoin. You want to buy something online. The store doesn't accept Bitcoin. Now what?
This skill solves that with a pipeline: Lightning → Bitrefill Visa → automated checkout. Your AI agent handles everything — detecting the store platform, finding coupon codes, purchasing an exact-amount Visa card with Lightning, and filling out the checkout form. You just approve the total.
How It Works
The pipeline has four stages:
- Detect the store platform — HTTP probes identify whether it's Shopify, Stripe, or WooCommerce (no browser needed, ~2 seconds)
- Find coupons + get exact total — searches 7 sources for discount codes, validates them via the Shopify Storefront API, gets the exact checkout total including shipping and tax
- Buy a Visa with Lightning — purchases an exact-amount prepaid Visa through Bitrefill using your Lightning wallet. No rounding up, no wasted balance.
- Automated checkout — fills the checkout form with your shipping info and card details using platform-specific selectors. ~15 seconds per checkout.
Two mandatory approval gates: you confirm the total before the Visa purchase, and you confirm the filled checkout form before submission. The agent never spends without your sign-off.
Why This Approach
No buyer-side checkout API exists
Every AI shopping agent — from sneaker bots to Browser Use to MultiOn — uses browser automation for the payment step. PCI compliance requires card details go through the merchant's payment iframe. There is no way around this.
Hardcoded selectors beat LLM navigation
We use platform-specific selectors (like sneaker bots) rather than LLM-driven page navigation (like Browser Use). The tradeoff: we need a module per platform. But three modules cover 65% of e-commerce, and each checkout takes ~15 seconds instead of ~120 seconds with LLM navigation. Zero AI tokens spent on the checkout itself.
Self-custodial, no KYC
The payment rail is fully self-custodial Lightning (we use phoenixd). Bitrefill requires no KYC. No bank account, no credit card company, no payment processor sees your identity. You hold your keys, your agent handles the rest.
Platform Coverage
- Shopify (~30% of e-commerce) — full support. Card iframes are fillable. Storefront API enables cart creation, discount validation, and exact pricing with zero browser interaction.
- Stripe Hosted Checkout (~15%) — full support. All fields are standard DOM elements, no iframes. The easiest to automate.
- WooCommerce + Braintree (~10%) — full support. Braintree card iframes are fillable.
- WooCommerce + Stripe (~10%) — partial. Stripe Elements blocks programmatic card entry. Shipping/contact fields work, but payment requires manual entry.
Not covered (~35%): Custom platforms, Amazon (use gift cards instead), sites with CAPTCHA, Shop Pay (requires phone + saved card).
The Coupon Finder
Before every purchase, the agent searches 7 sources for discount codes:
- Common pattern brute-force — generates ~247 codes (WELCOME10, SAVE15, FREESHIP, etc.)
- Store homepage — banners, popups, data attributes with promo codes
- Influencer/podcast codes — Google search for "[brand] podcast code" (highest value, 15-20% off)
- Google search — "[brand] coupon code [year]"
- Reddit — searches r/deals + general subreddits
- X/Twitter — "[brand] discount code"
- Coupon aggregator sites — RetailMeNot, CouponFollow, Coupons.com
All found codes are validated via the Shopify Storefront API (~0.5 seconds per code). Results sorted by savings.
Why this beats Honey: API validation is 10x faster than browser-based testing, zero privacy compromise (no extension sending your shopping data to PayPal), no affiliate link swapping, and more sources (brute-force + influencer + Reddit + Twitter).
The Payment Rail
Lightning → Bitrefill → Prepaid Visa → Any Store
Bitrefill sells prepaid Visa cards for Lightning payments. The key insight: you can buy exact custom amounts ($20.00–$500.00), not just round denominations. This means zero wasted balance on single-use cards.
Observed markup: ~2.4% average over face value (range 1.9–3.4%, varies with BTC/USD volatility). This is the cost of spending Bitcoin anywhere without KYC.
The flow:
- Agent gets the exact checkout total (e.g., $62.95)
- You approve the amount
- Agent buys a $62.95 Visa on Bitrefill, pays the Lightning invoice
- You approve the Lightning payment
- Agent redeems the Visa on PerfectGift.com → gets card number, CVV, expiry
- Agent fills the checkout form with the card details
Approval Gates
The agent never spends autonomously. Two hard gates:
- Gate 1 — Checkout total: Agent sends a screenshot of the checkout page showing item, shipping, tax, and total. You review and approve.
- Gate 2 — Lightning payment: Agent shows the Bitrefill order (item, total in USD and sats). You review and approve before the Lightning invoice is paid.
After Gate 2, the agent completes the purchase and sends a confirmation screenshot. Every payment is logged to an append-only ledger with payment hashes, card details, and order information.
Prerequisites
- Python 3.8+ with Playwright (
pip install playwright && playwright install chromium) - A Lightning wallet — we use phoenixd (self-custodial, single binary, HTTP API)
- A Bitrefill account — bitrefill.com (no KYC required)
- A Chromium-based browser — Brave recommended for fingerprint randomization
- An AI agent — built for OpenClaw but the scripts work standalone
What's in the Skill
detect_platform.py(970 lines) — platform detection, Shopify Storefront API, cart creation, discount validationcoupon_finder.py(629 lines) — 7-source coupon discovery + API validationshopify_checkout.py(826 lines) — Shopify checkout (classic + new styles)stripe_checkout.py(511 lines) — Stripe Hosted Checkoutwoocommerce_checkout.py(542 lines) — WooCommerce (Braintree + Stripe)- Selector references for Shopify and platform coverage documentation
Limitations
- Stripe Elements (embedded) — ~15-20% of stores embed Stripe on their own domain. Card fields are blocked by Stripe's security. Shipping/contact fields still work.
- Shop Pay — requires phone number + saved card. Impractical with single-use Visa cards.
- CAPTCHA — detected but not solved.
- Custom platforms (~35%) — not covered. Would need LLM-driven navigation or per-store modules.
- Prepaid Visa decline risk — some merchants flag prepaid cards. We've seen 0% decline rate across our purchases, but it's possible.