- Home
- Skills
- APIs & Backend
- Stop double credits and duplicate receipts in payments
Stop double credits and duplicate receipts in payments
What is inside: SKILL.md, failure-semantics table, PR review checklist; scripts/webhook_outbox_model.py (SQLite reference with an 8-thread race test, --self-test and --demo).
Free
Works with the AI Agents you already use
Stop double credits and duplicate receipts in payments
Example session with this skill installed
Command: python3 scripts/webhook_outbox_model.py --demo (five webhook calls for one order: first receipt send fails, then replays, a refund, and a late settlement callback)
- Read your context and instructions
- Compiled the stop double credits
call 1: status=settlement -> (503, 'settled+send_failed')
call 2: status=settlement -> (200, 'replay+sent')
call 3: status=settlement -> (200, 'replay+duplicate')
call 4: status=refund -> (200, 'reversed')
call 5: status=settlement -> (200, 'terminal')
ledger: [('credit', 5000), ('reversal', -5000)]
delivery: [('email:paid:ord-1', 'sent', 2)]
Note: Real output of the bundled reference model.
Connects securely to your tools. The creator never sees your data.
About this skill
What it does: a provider-agnostic method for payment callbacks that grant credits, orders, subscriptions or licenses and send a notification. It separates provider authentication, status verification, settlement and notification; shows which payload fields a signature really covers; classifies unknown statuses as review, never success; guards every transition in the UPDATE itself; routes every entry point (admin approval, manual transfer, legacy endpoints) through one settlement function; handles refunds as terminal states; and builds a notification outbox whose zero-row claims are classified (duplicate, in progress, stale, exhausted) instead of assumed duplicate. Ends with staged activation and an honest readiness ladder. Who it is for: developers integrating any payment provider, and reviewers checking such code before launch. What is inside: SKILL.md, failure-semantics table, PR review checklist; scripts/webhook_outbox_model.py (SQLite reference with an 8-thread race test, --self-test and --demo). Limits: not provider-specific documentation; you still follow your provider's signature and API docs. Not legal or compliance advice.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.
- Provider-neutral: signature formats and status names must come from your provider's docs.
- The reference model is single-file SQLite for clarity, not a production library.
- Exactly-once external delivery is impossible without provider idempotency support; the skill documents the trade-off instead of hiding it.
- Does not cover tax, invoicing law or PCI scope.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed today
- Free with an Agensi account
- Software
Git