![Getly Headless SDK](docs/assets/banner.png) **Give your AI assistant an API key. Get back a running digital-products business.** Products · PayPal + crypto checkout · File delivery · License keys · Blog · Subscriptions for your own product · Payouts — all driven by API, SDK, or MCP. [![CI](https://github.com/Getly-Store/headless-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/Getly-Store/headless-sdk/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-10b981.svg)](LICENSE) [![Docs](https://img.shields.io/badge/docs-getly.store%2Fdevelopers-10b981)](https://www.getly.store/developers) [Quickstart](#quickstart) · [MCP](#-mcp--your-ai-runs-the-store) · [Packages](#-whats-in-the-box) · [Pricing honesty](#-what-it-costs-no-fine-print) · [Examples](#-examples)
--- ## The 30-second version You're a vibe coder. You build with Cursor, Claude, Copilot, v0, Lovable. You have things worth selling — templates, code, prompts, courses, music — and zero desire to build carts, webhooks, tax-safe payment flows, file CDNs and payout rails. **Getly is that backend, already running.** This repo is everything your AI needs to drive it: ```bash # Point AI at a folder. Get a live product + a selling blog post + a pay link. npx @getly/auto-store ./my-icon-pack --dry-run ``` Behind that one command: Claude reads your folder, writes an honest product listing and an SEO article, uploads your files (up to 2GB), publishes to a marketplace with 708 categories, and hands you a checkout link that accepts **cards and USDT/USDC** — with delivery, receipts and license keys handled. > 🎬 *Demo GIF coming — run the command above with `--dry-run` to see the plan without writing anything.* ## Quickstart **1. Get an API key** (one manual step, ~2 minutes): [getly.store/dashboard/developer/keys](https://www.getly.store/dashboard/developer/keys) → create a key with the scopes you need. **2. Sell your first product:** ```ts import { Getly } from '@getly/sdk'; const getly = new Getly(); // reads GETLY_API_KEY from env const product = await getly.products.create({ name: 'Neon UI Kit', priceCents: 1900, // money is ALWAYS integer cents shortDescription: '120 dark-mode components for Figma', }); await getly.products.uploadFile(product.id, { fileName: 'neon-ui-kit.zip', data: await fs.readFile('./neon-ui-kit.zip'), }); const live = await getly.products.publish(product.id); console.log(live.urls.buy); // → share it. Getly handles checkout + delivery. ``` **3. Sell inside a conversation** (bots, support chats, anywhere): ```ts const link = await getly.checkoutLinks.create({ productId: product.id, couponCode: 'FRIENDS20', reference: chatId, // echoed back in the sale.completed webhook }); // → link.url — buyer pays with PayPal or USDT/USDC, no Getly account needed. ``` Prefer curl? The full copy-paste flow with expected responses: **[getly.store/developers](https://www.getly.store/developers)**. ## 🤖 MCP — your AI runs the store The part nobody else ships. Add Getly to Claude Code: ```bash claude mcp add getly --env GETLY_API_KEY=your_key -- npx -y @getly/mcp ``` or Cursor (`.cursor/mcp.json`): ```json { "mcpServers": { "getly": { "command": "npx", "args": ["-y", "@getly/mcp"], "env": { "GETLY_API_KEY": "your_key" } } } } ``` Now this is a conversation, not a coding session: > *"Upload everything in ~/designs/spring-pack as a new product at $24, write a launch post for my blog, and give me a 15%-off link I can share on X."* 30 tools: products (create/update/publish/upload), your own license-key pool, blog posts, coupons, checkout links, licenses, orders, sales stats, Getly Billing plans and subscriptions, category search, Pay Widget code. Destructive actions require explicit confirmation — a prompt-injected review can't nuke your store. `npx @getly/mcp init` writes the config for Claude Code / Cursor / Claude Desktop / Windsurf for you. ## 📦 What's in the box | Package | What it does | |---|---| | [`@getly/sdk`](packages/sdk-js) | Zero-dependency TypeScript client. Auto idempotency keys, rate-limit-aware backoff, one-call 2GB uploads, webhook signature verification, cursor iterators. | | [`@getly/mcp`](packages/mcp) | The MCP server above. `init` command, Smithery-ready. | | [`@getly/nextjs`](packages/nextjs) | `Checkout()` + `Webhooks()` route handlers — Polar-style one-liners for Next.js. | | [`@getly/auto-store`](packages/auto-store) | The folder → live store CLI (Claude-powered). | | [`create-getly-store`](packages/create-getly-store) | `npx create-getly-store my-shop` → a deployable Next.js storefront wired to your Getly store. | | [`examples/`](examples) | Telegram sales bot (sells in-chat, confirms payments), dependency-free storefront widget, one-line **Pay Widget** buy button. | | [**Pay Widget**](docs/pay-widget.md) | One `