[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-889":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":15,"starSnapshotCount":15,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},889,"agent-to-merchant-payments","Snaplii-Inc\u002Fagent-to-merchant-payments","Snaplii-Inc","Payments are broken for AI agents.  Snaplii unlocks real-world commerce with a safe, tokenized payment layer — powered by 500+ merchant gift cards — and is the only one that actually saves you money (up to 10% per transaction), on top of any existing deals or promotions.","https:\u002F\u002Fwww.snaplii.com\u002F",null,"Python",807,92,72,0,1,47.51,false,"main",true,[],"2026-06-11 04:00:34","# Agent-to-Merchant Payments by Snaplii\n\n> Payments are broken for AI agents.\n\nSnaplii unlocks real-world commerce with a safe, tokenized payment layer — powered by 500+ merchant gift cards — and is the only one that actually saves you money (up to 10% per transaction), on top of any existing deals or promotions.\n\n---\n## The Problem\nAI agents can already:\n- decide what to buy  \n- compare options  \n- navigate merchant platforms  \n\nBut they still can’t safely pay.\nPayments require trust, compliance, and risk control —  things AI agents are not designed to handle.\n\nGiving agents access to cards is not a solution.  It’s a risk.\n\n---\n\n## The Solution\nSnaplii introduces a new model:\n**User → Agent → Snaplii → Merchant**\n- Users fund Snaplii  \n- Agents operate within a controlled boundary  \n- Each transaction is **pre-funded, isolated, and non-reusable**  \n\nNo shared credentials. No persistent risk.\n\nIn addition, Snaplii embeds **value directly into the payment layer** —  \ntransactions can **save up to 10% and stack seamlessly with existing merchant deals and promotions**.\n---\n\n## Table of Contents\n\n- [Requirements](#requirements)\n- [Quick Start](#quick-start)\n  - [1. Get Your API Key via Snaplii App](#1-get-your-api-key-via-snaplii-app)\n  - [2. Get the Code](#2-get-the-code)\n  - [3. Install the CLI](#3-install-the-cli)\n  - [4. Authenticate](#4-authenticate)\n  - [5. Use the CLI](#5-use-the-cli)\n- [Components](#components)\n- [CLI Commands](#cli-commands)\n- [Claude Desktop Setup MCP Server](#claude-desktop-setup-mcp-server)\n- [Claude Code Skill](#claude-code-skill)\n- [Troubleshooting](#troubleshooting)\n- [Security](#security)\n- [License](#license)\n\n---\n\n## Requirements\n\n- Python 3.10+  \n  _CLI works on Python 3.9+, but the MCP server requires Python 3.10+._\n- Git\n- Snaplii Mobile App  \n  _Required to generate your API key._\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Mac users: check your Python version\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n```bash\npython3 --version\n```\n\nIf your Python version is below 3.10, install Python via Homebrew:\n\n```bash\nbrew install python@3.12\n```\n\nThen use `python3.12` and `pip3.12` instead of `python3` \u002F `pip3` in the steps below.\n\n\u003C\u002Fdetails>\n\n---\n\n## Quick Start\n\n### 1. Get Your API Key via Snaplii App\n\nBefore using the CLI or configuring your AI agent, generate a secure API key from the Snaplii mobile app:\n\n1. Download the Snaplii app for [iOS](https:\u002F\u002Fapps.apple.com\u002Fapp\u002Fsnaplii\u002Fid1596924498) or [Android](https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=com.snaplii.app).\n2. Register an account and bind a payment method to load your Snaplii Cash balance.\n3. In the app, go to **More → Payment Methods → AI Payment Management**.\n4. Tap **+ New API Key**.\n5. Set a name, define the permission scope, and set a hard spending limit.\n   - Example scopes: **Read-only** or **Purchase**\n6. Copy the API key.\n   - Format: `snp_sk_live_...`\n   - Keep it safe — it will only be shown once.\n\n### 2. Get the Code\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FSnaplii-Inc\u002Fagent-to-merchant-payments.git\ncd agent-to-merchant-payments\n```\n\n### 3. Install the CLI\n\n`pipx` is the smoothest path. It installs the CLI in its own isolated environment and puts the `snaplii` executable on your `PATH`.\n\n#### macOS\n\n```bash\nbrew install pipx\npipx ensurepath\n```\n\n#### Linux\n\n```bash\npython3 -m pip install --user pipx\npython3 -m pipx ensurepath\n```\n\n#### Windows\n\n**Option A — Scoop** (recommended):\n\n```powershell\nscoop install pipx\npipx ensurepath\n```\n\n**Option B — pip**:\n\n```powershell\npy -m pip install --user pipx\n```\n\n> If you see a warning that `pipx.exe` is not on PATH, run the following from the displayed path:\n> ```powershell\n> .\\pipx.exe ensurepath\n> ```\n\nRestart your terminal after running `ensurepath`.\n\n> **Note:** If you installed Python from the Microsoft Store, use `python3` instead of `py`.\n\n#### All platforms\n\n```bash\npipx install -e .\u002Fsnaplii-cli\n```\n\nOpen a new terminal window so the updated `PATH` takes effect, then verify the installation:\n\n```bash\nsnaplii --help\n```\n\n> If you see `command not found`, see [Troubleshooting](#troubleshooting).\n\n### 4. Authenticate\n\nLink your local CLI to your Snaplii account using the API key generated in Step 1:\n\n```bash\nsnaplii init\n```\n\nThe CLI will prompt for your API key via hidden input (like a password prompt). The key is used only to obtain a session token and is **never stored on disk**. Agent ID is auto-derived from the key.\n\n### 5. Use the CLI\n\n```bash\nsnaplii browse tags --prov CA                        # Browse gift card categories (CA or US)\nsnaplii browse brand --id CB...                      # See denominations and cashback\nsnaplii giftcard list                                # View owned cards\nsnaplii purchase --item-id CB...-CT... --price 50 --prov ON   # Buy a card\n```\n\n> `--item-id` is formatted as `{cardBrandId}-{cardTemplateId}`. Both IDs are available from `snaplii browse brand`.\n>\n> **Note on `--prov`:** For `browse tags`, use country code (`CA` for Canada, `US` for United States). For `purchase`, use province\u002Fstate code (`ON`, `QC`, `BC`, `NY`, `CA`, `TX`, etc.).\n\n---\n\n## Components\n\n```text\nagent-to-merchant-payments\u002F\n├── snaplii-cli\u002F       # Python CLI — pip-installable\n├── mcp-server\u002F        # MCP server for Claude Desktop\n├── skills\u002F            # Claude Code skill definition\n├── clawhub-publish\u002F   # ClawHub skill artifact\n└── clawhub-plugin\u002F    # ClawHub MCP bundle plugin\n```\n\n---\n\n## CLI Commands\n\n| Command | Purpose |\n|---|---|\n| `snaplii init` | Authenticate with your Snaplii API key |\n| `snaplii config show` | Show current config and auth status |\n| `snaplii browse tags` | Browse card categories and brands |\n| `snaplii browse brand --id ID` | View brand details, denominations, and cashback |\n| `snaplii giftcard list` | List owned gift cards |\n| `snaplii giftcard detail --card-no NO` | View card redemption code and PIN |\n| `snaplii purchase --item-id ID --price P --prov PROV` | Purchase a gift card (prov = province\u002Fstate) |\n| `snaplii smart cashback --brand-id ID --amount A` | Calculate cashback savings |\n| `snaplii smart dashboard` | View card inventory summary |\n\n---\n\n## Claude Desktop Setup MCP Server\n\nClaude Desktop cannot run CLI commands directly. It requires an MCP server to bridge the gap. The Snaplii MCP server exposes tools that let Claude browse gift cards and make purchases through natural conversation.\n\n### Step 1: Install dependencies\n\nThe MCP server requires Python 3.10+ and the `mcp` package. Install both the CLI and server dependencies:\n\n```bash\npip3 install -e .\u002Fsnaplii-cli\npip3 install \"mcp[cli]\"\n```\n\nIf you get an `externally-managed-environment` error, add `--break-system-packages`:\n\n```bash\npip3 install -e .\u002Fsnaplii-cli --break-system-packages\npip3 install \"mcp[cli]\" --break-system-packages\n```\n\n### Step 2: Authenticate one time\n\nThe MCP server reads credentials from `~\u002F.snaplii\u002Fconfig.json`. If you have not authenticated yet, run:\n\n```bash\nsnaplii init\n```\n\nEnter your API key when prompted.\n\n### Step 3: Configure Claude Desktop\n\nEdit your Claude Desktop config file:\n\n| OS | Config file location |\n|---|---|\n| macOS | `~\u002FLibrary\u002FApplication Support\u002FClaude\u002Fclaude_desktop_config.json` |\n| Windows | `%APPDATA%\\Claude\\claude_desktop_config.json` |\n| Linux | `~\u002F.config\u002FClaude\u002Fclaude_desktop_config.json` |\n\nAdd the `mcpServers` section. Create the file if it does not exist. Use absolute paths:\n\n```json\n{\n  \"mcpServers\": {\n    \"snaplii\": {\n      \"command\": \"\u002Fabsolute\u002Fpath\u002Fto\u002Fpython\",\n      \"args\": [\"\u002Fabsolute\u002Fpath\u002Fto\u002Fagent-to-merchant-payments\u002Fmcp-server\u002Fserver.py\"]\n    }\n  }\n}\n```\n\n> [!IMPORTANT]\n> - `command` must point to the Python interpreter where `mcp` is installed. Find it with `which python3` or `echo ~\u002F.venvs\u002Fsnaplii\u002Fbin\u002Fpython`.\n> - `args` must be the exact path to `server.py` inside your cloned repo.\n\n### Step 4: Restart Claude Desktop\n\nFully quit Claude Desktop, for example with `Cmd+Q` on macOS, then reopen it. You should now see the Snaplii tools available.\n\n### Step 5: Verify\n\nIn a new Claude Desktop conversation, ask:\n\n```text\nWhat gift cards are available on Snaplii?\n```\n\nClaude should automatically call `snaplii_browse_tags` and display the categories.\n\n---\n\n## Claude Code Skill\n\nClaude Code expects each skill in its own directory containing a `SKILL.md` file:\n\n```bash\nmkdir -p ~\u002F.claude\u002Fskills\u002Fsnaplii-cli\ncp skills\u002Fsnaplii-cli.md ~\u002F.claude\u002Fskills\u002Fsnaplii-cli\u002FSKILL.md\n```\n\nThen open:\n\n```text\n~\u002F.claude\u002Fskills\u002Fsnaplii-cli\u002FSKILL.md\n```\n\nIf the file contains a line like this:\n\n```text\nAlways prepend `export PATH=\"$PATH:\u002FUsers\u002F...\u002Fbin\" &&` before any snaplii command.\n```\n\nReplace the path with the directory that holds your `snaplii` binary. You can find it with:\n\n```bash\nwhich snaplii\n```\n\nOn Windows, use:\n\n```powershell\nwhere.exe snaplii\n```\n\nIf `snaplii` is already on your default `PATH`, you can delete the `export PATH=...` prefix entirely.\n\n---\n\n## Troubleshooting\n\n### `snaplii: command not found` after install\n\nThe console script was placed somewhere not on your `PATH`. Run:\n\n```bash\npython3 -m pip show -f snaplii-cli\n```\n\nLook for an entry ending in `bin\u002Fsnaplii` or `Scripts\\snaplii.exe` on Windows. Then either prepend that directory to `PATH` in your shell configuration, or reinstall using `pipx`.\n\n### `externally-managed-environment` from pip\n\nYour system Python forbids global package installs. Use `pipx`, which is recommended, or a virtual environment. As a last resort, append `--break-system-packages` to the pip command.\n\n### Claude Desktop logs `ModuleNotFoundError: No module named 'mcp'` or `'snaplii'`\n\nThe Python interpreter referenced by `command` in `claude_desktop_config.json` does not have the required dependencies. Confirm with:\n\n```bash\n\u002Fabsolute\u002Fpath\u002Fto\u002Fpython -c \"import mcp, snaplii; print('ok')\"\n```\n\nIf it fails, install the missing packages into that specific interpreter:\n\n```bash\npip install -e .\u002Fsnaplii-cli\npip install \"mcp[cli]\"\n```\n\n---\n\n## Security\n\n- **Limited authorization:** agents can only spend from Snaplii Cash, your prepaid balance.\n- **Scoped API keys:** keys can be restricted to `PAY_READ` view-only or `PAY_WRITE` view + purchase.\n- **Spending limits:** strict per-key consumption caps are set via the mobile app.\n- **Data protection:** card redemption codes and PINs are strictly masked and never exposed without explicit user consent.\n\n---\n\n## License\n\nThis project is licensed under the **Apache License 2.0**.\n\nSee the [Apache License 2.0](https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0) for details.\n","Snaplii-Inc\u002Fagent-to-merchant-payments 项目提供了一种安全的代币化支付层，使AI代理能够进行实际商业交易。它通过超过500家商户礼品卡支持的支付系统，不仅保证了交易的安全性，还能够在现有优惠基础上额外节省高达10%的费用。该项目使用Python语言开发，其核心功能包括预资助、隔离且不可重复使用的交易机制，确保无共享凭证和持续风险。适合需要在AI代理与现实世界商家之间实现安全支付的应用场景，如自动化购物助手等。",2,"2026-06-11 02:40:02","CREATED_QUERY"]