AI agent payment layer for real-world commerce has been a critical missing piece in the autonomous agent ecosystem. Snaplii addresses this gap by providing a safe, tokenized payment system that enables AI agents to complete real-world purchases through 500+ merchant gift cards. Built in Python and released under the Apache License 2.0, Snaplii not only unlocks commerce for autonomous agents but also delivers up to 10% savings per transaction – on top of any existing deals or promotions. This makes it the only AI payment solution that actually saves money while enabling agents to transact in the physical world. With 628 stars and 80 forks on GitHub, Snaplii is gaining traction as the standard payment infrastructure for agentic AI.

How It Works

Understanding the Snaplii Architecture

The Snaplii architecture is designed around a simple but powerful principle: AI agents should never handle raw payment credentials. Instead, Snaplii acts as a secure intermediary that tokenizes every transaction and routes it through a vast network of merchant gift cards. The architecture diagram below illustrates the full payment pipeline from agent intent to merchant fulfillment.

Snaplii Architecture

At the top of the pipeline sits the AI Agent, which represents any autonomous system – from a Claude Desktop agent to a custom Python script – that decides a purchase is necessary. The agent does not hold credit card numbers or bank credentials. Instead, it communicates with the Snaplii SDK, a Python library that provides a clean interface for browsing merchants, requesting quotes, and initiating purchases. The SDK translates high-level agent commands into structured API calls.

Beneath the SDK lies the Tokenization Engine, the security core of the system. When an agent requests a payment, the engine generates a single-use token that represents a pre-funded Snaplii Cash balance. This token is scoped to the exact transaction amount and merchant, making it useless if intercepted. The engine never exposes the user’s underlying funding source to the agent or the merchant.

The Merchant Catalog maintains an inventory of over 500 merchant gift cards across North America. Agents can browse categories such as dining, travel, retail, and software. Each brand entry includes available denominations, regional eligibility, and real-time cashback rates. The catalog is accessible via REST API, CLI, or MCP tools, allowing agents to query it in whatever integration mode they support.

Once a merchant and denomination are selected, the Gift Card Redemption module executes the purchase. It draws from the tokenized balance, acquires the digital gift card, and delivers it to the agent’s wallet. The Merchant/Service then receives the gift card as payment and fulfills the order – whether that means delivering a meal, booking a flight, or provisioning software access.

Finally, the Savings Layer automatically applies cashback and voucher optimization. Before any purchase, the agent can call the quote endpoint to preview the final price after discounts. The savings layer ensures that every transaction captures the maximum possible discount, including stacking Snaplii cashback with existing merchant promotions. This optimization happens transparently – the agent simply requests a quote and receives the best available price without needing to understand the underlying voucher mechanics.

The entire architecture is built with security as the primary constraint. Every component – from the SDK to the redemption module – operates on the principle of least privilege. The agent never sees credentials, the merchant never sees the user’s funding source, and the tokenization engine maintains a complete audit trail of every transaction for reconciliation and compliance purposes.

Key Insight: Snaplii solves the fundamental problem that AI agents cannot hold traditional bank accounts or credit cards. By using tokenized gift cards as the payment instrument, Snaplii creates a secure bridge between autonomous digital agents and real-world merchant transactions without exposing sensitive financial credentials.

Key Features

Understanding the Snaplii Feature Set

Snaplii is not merely a payment API. It is a full-stack payment layer designed specifically for the constraints and opportunities of autonomous agents. The features diagram below shows how each capability radiates from the central payment hub to address a distinct need in agent-driven commerce.

Snaplii Features

The 500+ Merchant Gift Cards feature gives agents access to one of the largest digital gift card networks available. Coverage spans major brands in dining, travel, entertainment, retail, and SaaS. Because the catalog is exposed through a uniform API, an agent can switch from ordering pizza to booking a hotel without changing integration code.

Tokenized Security ensures that no raw credentials ever pass through agent memory or logs. API keys are used once to obtain a short-lived JWT token, which is then discarded. Spending limits are enforced at the account level via the Snaplii mobile app, and each key can be restricted to read-only or purchase scopes. Card redemption codes and PINs are masked until explicitly requested.

The AI Agent SDK is published as snaplii-cli on PyPI and installable via pipx. It provides a command-line interface that any agent capable of shell execution can invoke. The SDK wraps the REST API with sensible defaults, error handling, and formatted output. For agents running inside Claude Desktop, Cursor, or VS Code, the MCP Server exposes 13 tools via the Model Context Protocol, enabling natural-language payment commands.

Up to 10% Savings is not a marketing claim – it is a built-in optimization layer. Every quote request returns the best-fit voucher and cashback configuration. The savings stack with existing merchant deals, meaning an agent can compound discounts that a human shopper might miss. The snaplii smart cashback command even lets agents pre-calculate savings before committing to a purchase.

Real-World Commerce is the ultimate goal. By converting digital agent intent into merchant gift cards, Snaplii enables agents to operate in the physical economy. An agent can order groceries, book rides, or subscribe to services on behalf of a user, all within a controlled, pre-funded budget.

Deal Stacking and Autonomous Payments round out the feature set. Deal stacking means Snaplii cashback combines with merchant promotions, credit card rewards, and seasonal sales. Autonomous payments mean that once an agent is configured with a scoped API key and spending cap, it can execute transactions without human intervention – perfect for recurring subscriptions, automated procurement, or travel booking workflows.

Feature Description
500+ Merchant Gift Cards Extensive North American merchant network across dining, travel, retail, and SaaS
Tokenized Security Single-use tokens, scoped API keys, and masked redemption codes protect credentials
AI Agent SDK Python CLI (snaplii-cli) installable via pipx, with formatted output and error handling
MCP Server 13 tools exposed via Model Context Protocol for Claude, Cursor, OpenClaw, and VS Code
Up to 10% Savings Automatic cashback and voucher optimization on every transaction
Real-World Commerce Bridges digital agents to physical purchases via tokenized gift cards
Deal Stacking Combines Snaplii savings with existing merchant promotions and rewards
Autonomous Payments Pre-funded, scoped keys enable fully automated transaction execution

Amazing: Snaplii supports over 500 merchant gift cards and delivers up to 10% savings per transaction – savings that stack on top of existing deals and promotions. This means an AI agent booking a flight, ordering food, or purchasing software can automatically optimize costs beyond what a human user could achieve manually.

Installation

Prerequisites

Before installing Snaplii, ensure you have the following:

  • Python 3.10 or higher (the CLI works on Python 3.9+, but the MCP server requires 3.10+)
  • Git for cloning the repository
  • Snaplii Mobile App (iOS or Android) to generate your API key

Step 1: Get Your API Key

  1. Download the Snaplii app for iOS or Android.
  2. Register an account and bind a payment method to load your Snaplii Cash balance.
  3. Navigate to More → Payment Methods → AI Payment Management.
  4. Tap + New API Key, set a name, choose a scope (Read-only or Purchase), and define a spending limit.
  5. Copy the API key (format: snp_sk_live_...). It will only be shown once.

Step 2: Clone the Repository

git clone https://github.com/Snaplii-Inc/agent-to-merchant-payments.git
cd agent-to-merchant-payments

Step 3: Install pipx

pipx is the recommended installer because it isolates the CLI in its own environment.

macOS:

brew install pipx
pipx ensurepath

Linux:

python3 -m pip install --user pipx
python3 -m pipx ensurepath

Windows (Scoop):

scoop install pipx
pipx ensurepath

Step 4: Install the Snaplii CLI

pipx install -e ./snaplii-cli

Open a new terminal and verify the installation:

snaplii --help

Step 5: Authenticate

snaplii init

Enter your API key when prompted. The key is used only to obtain a session token and is never stored on disk.

Usage

Understanding the Snaplii Workflow

Once installed, an agent can execute a complete purchase workflow in seven steps. The workflow diagram below visualizes the process from SDK installation through savings verification, including the decision point for handling failed payments.

Snaplii Workflow

Step 1: Install Snaplii SDK. The agent or developer installs snaplii-cli via pipx. This places the snaplii executable on the system PATH and isolates dependencies from the system Python environment.

Step 2: Configure API Keys. Using the Snaplii mobile app, the user generates a scoped API key with a hard spending limit. The agent runs snaplii init once to exchange the API key for a session token. The token is ephemeral and tied to the agent ID derived from the key.

Step 3: Initialize Agent. The agent is now capable of making authenticated requests. For MCP integrations, the MCP client configuration points to mcp-server/server.py. For REST integrations, the agent stores the JWT bearer token in memory or environment variables.

Step 4: Select Merchant. The agent browses the merchant catalog. Using the CLI, this looks like:

snaplii browse tags --prov CA
snaplii browse brand --id CB...

The --prov flag accepts country codes (CA, US) for browsing and province/state codes (ON, NY, TX) for purchasing.

Step 5: Tokenize Payment. Before executing a purchase, the agent requests a quote to preview the final price after vouchers and cashback:

snaplii quote --item-id CB...-CT... --price 50

The quote endpoint returns the exact amount that will be deducted from Snaplii Cash, including any savings.

Step 6: Execute Purchase. The agent completes the transaction:

snaplii purchase --item-id CB...-CT... --price 50 --prov ON

The purchase endpoint acquires the digital gift card, delivers it to the agent’s wallet, and returns a confirmation. The gift card can then be redeemed at the merchant to fulfill the original order.

Step 7: Verify Savings. The agent reviews the transaction summary to confirm that the expected cashback and voucher discounts were applied. The snaplii smart dashboard command provides an inventory summary of owned cards and recent savings.

If a payment fails – for example, if a merchant card is temporarily out of stock – the agent can retry with an alternative merchant from the same category. The decision diamond in the workflow represents this retry loop, ensuring that agent workflows are resilient to transient catalog changes.

For developers building custom agents, the REST API offers the same workflow via HTTP. The base URL is https://aipayment.snaplii.com, and all endpoints require the Authorization: Bearer <token> header. The MCP server exposes equivalent functionality through 13 structured tools, making it ideal for agents running inside Claude Desktop, Cursor, or OpenClaw.

Takeaway: With just a few lines of Python or a handful of CLI commands, any AI agent can gain the ability to complete real-world transactions. The Snaplii SDK handles tokenization, merchant selection, and payment execution – allowing developers to focus on agent intelligence rather than payment infrastructure.

Conclusion

Snaplii represents a fundamental advance in the agentic AI ecosystem. By solving the payment problem with a tokenized, pre-funded, scoped architecture, it enables autonomous agents to participate in real-world commerce without compromising security. The combination of 500+ merchant gift cards, up to 10% automatic savings, and multi-modal integration (REST API, Python CLI, MCP Server, OpenClaw Skill) makes Snaplii the most versatile payment layer available for AI agents today.

Whether you are building a personal assistant that books travel, a procurement bot that orders supplies, or a research agent that subscribes to data services, Snaplii provides the infrastructure to make those transactions safe, auditable, and cost-optimized. New users can also take advantage of the welcome offer: $10 off your first $30 transaction, making it easy to test the platform with real purchases.

Important: As AI agents gain the ability to transact in the real world, security and auditability become paramount. Snaplii’s tokenized approach ensures that no raw payment credentials are ever exposed to the agent or stored in agent memory, making it a safe foundation for autonomous commerce.

Links:

Watch PyShine on YouTube

Contents