payments

payments is a skill for Claude Code, Codex from kouroshez/coding-os. It costs 200 tokens per session (2,172 once invoked), scanned A, original, Apache-2.0.

A guide to integrating payments, subscriptions, invoices, refunds, disputes, and other systems that move or track money.

In plain words
What is it for?
Use it when connecting Stripe, Adyen, Braintree, or PayPal, handling payment webhooks, designing subscriptions, issuing refunds, or reconciling payments with a ledger.
Why use it?
It helps prevent duplicate charges, lost transactions, incorrect billing states, and mismatches between a payment provider and your records.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kouroshez/coding-os/payments
Any agent
npx skills add kouroshez/coding-os --skill payments
Clone the repo
git clone --depth 1 https://github.com/kouroshez/coding-os

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for payments

README.md
[![agentmods](https://agentmods.dev/badge/skills/kouroshez/coding-os/payments.svg)](https://agentmods.dev/skills/kouroshez/coding-os/payments)
Your own site
<a href="https://agentmods.dev/skills/kouroshez/coding-os/payments"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/payments.svg" alt="Measured on agentmods" height="20"></a>
Per session 200 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,172 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00200 $0.02172
Opus 5 $0.00100 $0.01086
Sonnet 5 $0.00040 $0.00434
Haiku 4.5 $0.00020 $0.00217

Measured 4d ago against content hash a7c48c5cd720, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

payments scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/core/skills/payments/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Payments & Billing — Moving Money Without Losing It

A practical guide to integrating a payment provider such that money is never double-charged, never silently lost, and always reconcilable. Stack-agnostic; recipes target Stripe as the reference provider, with Adyen / Braintree / PayPal noted where the model differs. The governing mindset: a payment bug is a money bug, and money bugs are visible to finance, regulators, and angry customers.

When to Use This Skill

  • Wiring a first charge / checkout — payment intents, hosted fields, confirmation flow.
  • Handling a provider webhook (payment_intent.succeeded, charge.refunded, invoice.paid).
  • Designing a subscription, metered/usage billing, free trial, proration, or dunning flow.
  • Making money movement idempotent — a retried request must never charge twice.
  • Issuing refunds, handling disputes/chargebacks, partial captures.
  • Reconciling provider state against an internal ledger; closing the books.

Skip when: the work is a generic non-money API endpoint (api-design) or generic auth/injection hardening (security-web) with no money movement — those skills own that. This skill is specifically the financial-correctness layer.

The Five Money-Correctness Invariants

These override convenience every time:

  1. Never trust a client-sent amount. The price is computed server-side from the cart/plan, never read from the request body. A client that POSTs {"amount": 1} for a $1000 order must be charged $1000. This is the single most exploited payments bug.
  2. Every money mutation is idempotent. A charge/capture/refund call carries an idempotency key derived from the business intent (e.g. order_id), so a network retry returns the original result instead of moving money again. (api-design owns the generic idempotency-key mechanics; this skill mandates it for money.)
  3. The provider webhook is the source of truth for state, not the API response. The synchronous create-charge response can be lost (timeout) while the charge still succeeds. Treat the charge as pending until the webhook confirms; reconcile on the webhook.
  4. Money is integer minor units, never a float. Store amount_cents (or the currency's minor unit) as an integer. 0.1 + 0.2 != 0.3 in floating point — that rounding error is a regulatory finding.
  5. Every movement is double-entry on an append-only ledger. A charge debits one account and credits another; the ledger is immutable (corrections are reversing entries, never edits). This is what makes reconciliation and audit possible. (db-design owns the ledger schema; this skill owns the discipline.)

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 103 lines · 200 tokens per session scan A a7c48c5cd720

Subscribe to this mod's changes

payments is a skill published in the GitHub repository kouroshez/coding-os (6 stars, last pushed 4d ago), licensed Apache-2.0. It adds 200 tokens to every session and 2,172 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

txline-sharp-agent

Point an agent at the paywalled TxLINE World Cup odds API with Gecko (one line, no integration code), monitor the feed, and flag sharp implied-probability moves — the signal for a trading tool or an on-chain prediction market. Runs $0 in recorded mode. Use when building a Solana sports-trading agent, a…

GeckoVision/gecko-surf · 92 tokens

financial-memo-writer

Write investment-research memos and articles in a sincere, contrarian, framework-first zh-TW (Taiwan-market) voice. Use when asked to draft, ghost-write, or continue an in-depth analysis (深度分析), a multi-topic weekly market note (週度市場筆記), or a short column/op-ed (短評/專欄), or to rewrite content into a…

HaoweiChan/tinboker · 0 tokens

sf-knowledge-financial-services-cloud-object-reference

Apply Salesforce knowledge and best practices for Agentforce Financial Services Developer Guide.

Avinava/sf-documentation-knowledge · 23 tokens

sf-knowledge-asl-dev-guide

Apply Salesforce knowledge and best practices for Accounting Subledger Developer Guide.

Avinava/sf-documentation-knowledge · 20 tokens

duanyongping-perspective

段永平的思维框架与表达方式。基于雪球原帖、巴菲特午餐实录、浙大演讲、 8个关键决策记录和完整人生时间线的深度调研, 提炼5个核心心智模型、7条决策启发式和完整的表达DNA。 用途:作为思维顾问,用段永平的视角分析投资决策、企业经营、人生选择等问题。 当用户提到「用段永平的视角」「段永平会怎么看」「段永平模式」「大道视角」时使用。 即使用户只是说「帮我用段永平的角度想想」「如果段永平会怎么做」「切换到大道」也应触发。.

anneheartrecord/charles-skill · 172 tokens

sector-rotation

行业轮动分析——申万行业景气度评分、行业动量排名、产业链传导、估值/盈利/资金流多维比较框架.

HKUDS/Vibe-Trading · 39 tokens