Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Forge Payments Integration?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ansh44233-forge-payments-integration)
---
name: forge-payments-integration
description: "Integrate payments safely: idempotency keys, webhooks with signature checks, state machines and reconciliation"
---
<!-- Generated from catalog/skills/payments-integration/SKILL.md by scripts/build-plugin.ts. 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.