[01] LOOP
FinanceintervalHardenedTemplate

Agentic Payments for APIs on Autopilot

Inspired by Orthogonal — Agentic Payments for APIs. Loop until the workflow is current, exceptions are owned, and human sign-off is captured where required.

Inspired by Orthogonal

by Trooper

Kickoff prompt
/loop 30m Start the "Agentic Payments for APIs on Autopilot" loop.

Inspired by Orthogonal (https://orthogonal.com).

Goal: open work triaged, exceptions owned, and core finance workflow current with audit trail
Max iterations: 20
Between iterations run: Report open queue items, stale tasks, failed automations, and items awaiting human approval for Orthogonal
Exit when: zero open items without owner or explicit escalation, all external actions approved or sent, and systems of record current

Step 1 — Ingest transactions: Pull payment intents, voice sessions, or chain events into one queue.
Step 2 — Validate and route: Check compliance, limits, and routing rules before execution.
Step 3 — Execute settlement: Process payments with retries, idempotency, and structured responses.
Step 4 — Reconcile ledger: Match settlements to internal records and flag exceptions.
Step 5 — Report and alert: Surface failures, chargebacks, and SLA breaches to ops.

## Before you start

Connect plugins:
- GitHub (required) — Read branches, PRs, reviews, checks, workflow runs, and source diffs.
- Stripe (required) — Verify checkout, billing, payment, and subscription state.
- Browser / Web access (required) — Open pages, inspect live state, collect evidence, and verify changes.

Attach skills:
- Loop runner (required) — Self-pace iterations, run the check between passes, and stop only on the exit condition.
- Code change + local verification (optional) — Edit code safely, run commands, and keep changes scoped.
- CI debugging (optional) — Read failing checks, logs, and the smallest actionable root cause.
- Approval workflows (optional) — Keep outbound actions in draft or approval states when risk is non-trivial.
- Browser QA (optional) — Exercise product flows, capture visual evidence, and verify fixes in-browser.

Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.

Paste the kickoff prompt into Cursor, Claude Code, or Codex. Deeplinks do not install hook files.

Steps

1. Ingest transactions

Pull payment intents, voice sessions, or chain events into one queue.

2. Validate and route

Check compliance, limits, and routing rules before execution.

3. Execute settlement

Process payments with retries, idempotency, and structured responses.

4. Reconcile ledger

Match settlements to internal records and flag exceptions.

5. Report and alert

Surface failures, chargebacks, and SLA breaches to ops.

Flow diagram

Guardrails

Rules the agent must follow so it cannot cheat the exit condition.

  • Require human approval before customer-facing sends, payments, or legal submissions unless pre-approved templates apply
  • Preserve full audit trail linking source data to every automated action
  • Escalate compliance, safety, or regulatory-sensitive items immediately
  • Do not post ledger entries or bind coverage without explicit human approval

More Finance loops