forge-payments: Payments
Engine: Hybrid — Forge + wshobson
Purpose
Audit money movement, pricing, entitlements, provider events, reconciliation, idempotency, and sensitive data boundaries.
Deterministic runtime composition
Before loading any provider procedure, run:
Resolve ../../runtime/cli/src/composition-entry.js relative to this SKILL.md, then run:
node "<resolved-absolute-runner-path>" payments compose --workflow audit --root "<repository-root>" --dry-run --json
Add one repeatable --request <provider-or-source> flag for each explicit user request. Add
--condition <task-condition> or --risk-surface <surface> only for a task fact you directly
proved; never infer one from generic wording. The command above is the default for this
audit-oriented module; for implementation use --workflow build, and for a fix, retest, or
release gate use --workflow fix, verify, or ship respectively. Read the JSON response,
keep the Forge contract at index zero, and resolve paths against the absolute runtime_root
reported in that response. Read eager[].runtimePath when entering the module. The full
selected[] list is availability/provenance; load only deferred[].runtimePath when the task
reaches that concern, in tier order. Refuse any path that escapes the root. Respect every reported
suppression and context budget. If missing is non-empty, stop and report the installation as
damaged; do not improvise a prose fallback. The runner and specialist content may live in a plugin
cache or global installation; never assume they are inside the audited repository.
Resolve and read ../fullstack-forge/references/shared/module-contract.md (applicability,
execution, mutation, verification, completion) and
../fullstack-forge/references/shared/evidence-rules.md (statuses, standards, tools, findings via
../fullstack-forge/references/PROTOCOL.md) relative to this module SKILL.md before reporting.
Never hide failed checks or claim that an operation ran when it did not.
Automatic activation signals
Activate when a request or direct repository evidence involves payments, when
the user explicitly names forge-payments, or when discovery proves an applicable boundary.
- Payments, billing, subscriptions, refunds, credits, invoices, or financial ledgers
When not to activate
- No money, stored value, pricing, or paid entitlement
Automated support
Relevant discovery inputs are:
- payment routes and provider integration
- pricing and ledger models
- webhook handlers
Deterministic support, bounded evidence only:
Agent inspection procedure
- Trace amount determination: every charge, refund, and credit derives from server-owned records, never client input.
- Verify precision: minor-unit or decimal arithmetic, documented rounding, and tax and discount ordering.
- Inspect webhooks: raw-byte signature verification before parsing, durable event-ID idempotency before side effects, and out-of-order tolerance.
- Map the payment state machine: legal transitions, partial-failure recovery, and reconciliation against provider records.
- Check test/live separation, sensitive-data boundaries (hosted fields), refund and dispute paths, and the audit trail for money movement.
Manual inspection requirements:
- Review provider dashboard settings and sample reconciliations
- Obtain qualified compliance and financial review where applicable
Stack-specific guidance:
- Use provider-hosted collection where possible and never trust client-calculated amounts
Evidence to collect
Standards used as criteria:
- OWASP Third Party Payment Gateway Integration Cheat Sheet
- PCI DSS scope concepts
Common production failures
- Trace quote-to-entitlement and refund/dispute flows with currency and minor-unit handling
- Inspect server-authoritative amounts, idempotency, webhook raw-body signatures, replay defense, ordering, duplicate events, state machines, and reconciliation
- Check authorization, audit trails, secrets, hosted-field boundaries, tax/discount rounding, negative amounts, and failure recovery
Missing-control checks
Each item needs direct evidence or one reasoned status.
- Server-side amount calculation
- Currency precision
- Rounding
- Webhook signatures
- Idempotency
- Duplicate payments
- Reconciliation
- Refunds
- Partial failures
- Payment state machines
- Client-side tampering
- Test and live separation
- Sensitive data
- Audit trails
- Replay attacks
- Price changes
- Subscription transitions
- Chargeback handling
- Webhook ordering
Commands and tools
- Run
forge payments audit --json or fullstack-forge payments audit --json when
an explicit audit is requested and the CLI is installed. Normal feature work does not require it.
Safe fixes
- Add idempotency storage, explicit currency validation, and duplicate-event tests
- Redact payment identifiers from logs
Approval-required changes
- Changing financial calculations, prices, ledgers, provider, settlement, or entitlement semantics
Verification
- Run sandbox success, duplicate, timeout, delayed webhook, refund, and dispute scenarios
- Reconcile provider, internal ledger, and granted entitlement
Completion contract
Follow fullstack-forge/references/shared/completion.md and the limitations below.
Known limitations
- Do not claim PCI or financial compliance from a code audit
1---2name: forge-payments-33description: Audit money movement, pricing, entitlements, provider events, reconciliation, idempotency, and sensitive data boundaries.4---56# forge-payments: Payments78Engine: Hybrid — Forge + wshobson910## Purpose1112Audit money movement, pricing, entitlements, provider events, reconciliation, idempotency, and sensitive data boundaries.131415## Deterministic runtime composition1617Before loading any provider procedure, run:1819Resolve `../../runtime/cli/src/composition-entry.js` relative to this `SKILL.md`, then run:2021`node "<resolved-absolute-runner-path>" payments compose --workflow audit --root "<repository-root>" --dry-run --json`2223Add one repeatable `--request <provider-or-source>` flag for each explicit user request. Add24`--condition <task-condition>` or `--risk-surface <surface>` only for a task fact you directly25proved; never infer one from generic wording. The command above is the default for this26audit-oriented module; for implementation use `--workflow build`, and for a fix, retest, or27release gate use `--workflow fix`, `verify`, or `ship` respectively. Read the JSON response,28keep the Forge contract at index zero, and resolve paths against the absolute `runtime_root`29reported in that response. Read `eager[].runtimePath` when entering the module. The full30`selected[]` list is availability/provenance; load only `deferred[].runtimePath` when the task31reaches that concern, in tier order. Refuse any path that escapes the root. Respect every reported32suppression and context budget. If `missing` is non-empty, stop and report the installation as33damaged; do not improvise a prose fallback. The runner and specialist content may live in a plugin34cache or global installation; never assume they are inside the audited repository.353637Resolve and read `../fullstack-forge/references/shared/module-contract.md` (applicability,38execution, mutation, verification, completion) and39`../fullstack-forge/references/shared/evidence-rules.md` (statuses, standards, tools, findings via40`../fullstack-forge/references/PROTOCOL.md`) relative to this module `SKILL.md` before reporting.4142Never hide failed checks or claim that an operation ran when it did not.4344## Automatic activation signals4546Activate when a request or direct repository evidence involves payments, when47the user explicitly names `forge-payments`, or when discovery proves an applicable boundary.4849- Payments, billing, subscriptions, refunds, credits, invoices, or financial ledgers5051## When not to activate5253- No money, stored value, pricing, or paid entitlement5455## Automated support5657Relevant discovery inputs are:5859- payment routes and provider integration60- pricing and ledger models61- webhook handlers6263Deterministic support, bounded evidence only:6465- `inspect-routes`6667## Agent inspection procedure68691. Trace amount determination: every charge, refund, and credit derives from server-owned records, never client input.702. Verify precision: minor-unit or decimal arithmetic, documented rounding, and tax and discount ordering.713. Inspect webhooks: raw-byte signature verification before parsing, durable event-ID idempotency before side effects, and out-of-order tolerance.724. Map the payment state machine: legal transitions, partial-failure recovery, and reconciliation against provider records.735. Check test/live separation, sensitive-data boundaries (hosted fields), refund and dispute paths, and the audit trail for money movement.7475Manual inspection requirements:7677- Review provider dashboard settings and sample reconciliations78- Obtain qualified compliance and financial review where applicable7980Stack-specific guidance:8182- Use provider-hosted collection where possible and never trust client-calculated amounts8384## Evidence to collect8586Standards used as criteria:8788- OWASP Third Party Payment Gateway Integration Cheat Sheet89- PCI DSS scope concepts9091## Common production failures9293- Trace quote-to-entitlement and refund/dispute flows with currency and minor-unit handling94- Inspect server-authoritative amounts, idempotency, webhook raw-body signatures, replay defense, ordering, duplicate events, state machines, and reconciliation95- Check authorization, audit trails, secrets, hosted-field boundaries, tax/discount rounding, negative amounts, and failure recovery9697## Missing-control checks9899Each item needs direct evidence or one reasoned status.100101- Server-side amount calculation102- Currency precision103- Rounding104- Webhook signatures105- Idempotency106- Duplicate payments107- Reconciliation108- Refunds109- Partial failures110- Payment state machines111- Client-side tampering112- Test and live separation113- Sensitive data114- Audit trails115- Replay attacks116- Price changes117- Subscription transitions118- Chargeback handling119- Webhook ordering120121## Commands and tools122123- Run `forge payments audit --json` or `fullstack-forge payments audit --json` when124 an explicit audit is requested and the CLI is installed. Normal feature work does not require it.125126## Safe fixes127128- Add idempotency storage, explicit currency validation, and duplicate-event tests129- Redact payment identifiers from logs130131## Approval-required changes132133- Changing financial calculations, prices, ledgers, provider, settlement, or entitlement semantics134135## Verification136137- Run sandbox success, duplicate, timeout, delayed webhook, refund, and dispute scenarios138- Reconcile provider, internal ledger, and granted entitlement139140## Completion contract141142Follow `fullstack-forge/references/shared/completion.md` and the limitations below.143144## Known limitations145146- Do not claim PCI or financial compliance from a code audit