Skip to content
Back to skills

Payments Integration

ASecurity

Integrate payments safely: idempotency keys, webhooks with signature checks, state machines and reconciliation

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
developmentrust

Works with

  • cli

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill payments-integration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Payments Integration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Payments Integration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-payments-integration/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-payments-integration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: payments-integration
description: "Integrate payments safely: idempotency keys, webhooks with signature checks, state machines and reconciliation"
---

<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->

# Payments integration

Use when adding or changing charges, subscriptions, refunds or payouts (Stripe or similar).

## Money
- Store amounts as integers in the smallest currency unit, with the currency code. Never use floats.
- Compute totals on the server. Never trust a price sent by the client.

## Idempotency
- Send an idempotency key with every create call, derived from your own order or attempt id, so retries cannot double-charge.
- Make your own endpoints idempotent too: one order id means one charge.

## Webhooks
1. Verify the signature with the raw request body and the endpoint secret before parsing.
2. Deduplicate events by event id; providers retry and may deliver out of order.
3. Respond 2xx quickly and process asynchronously.
4. Treat the webhook, not the client redirect, as the source of truth for payment success.

## State
Model orders as an explicit state machine (`pending → paid → fulfilled`, `refunded`, `failed`) and only allow valid transitions. Record every provider event against the order.

## Secrets and compliance
Keep secret keys server-side in environment variables, use the provider's hosted fields or checkout so card data never touches your servers, and use restricted keys where possible.

## Reconcile
Run a scheduled job comparing provider records with your orders, and alert on mismatches.

## Verify
Use test mode and test cards: success, decline, 3-D Secure, duplicate webhook, out-of-order webhook and refund. Never test against live keys.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.