Skip to content

Add fake payments API#42

Open
surim0n wants to merge 1 commit into
tscircuit:mainfrom
surim0n:codex/payment-api-bounty-1
Open

Add fake payments API#42
surim0n wants to merge 1 commit into
tscircuit:mainfrom
surim0n:codex/payment-api-bounty-1

Conversation

@surim0n
Copy link
Copy Markdown

@surim0n surim0n commented May 20, 2026

/claim #1

Summary

  • Adds fake payment records to the in-memory database schema.
  • Adds send, list, get, and terminal status update routes for fake payments.
  • Makes send idempotent when an idempotency_key is provided.
  • Documents the payment endpoints in the README.

Verification

  • bun install --frozen-lockfile
  • bun test tests/routes/payments.test.ts
  • bun test
  • bunx biome check lib/db/schema.ts lib/db/db-client.ts routes/payments tests/routes/payments.test.ts README.md
  • bun run build
  • bunx tsc --noEmit
  • git diff --check

@surim0n
Copy link
Copy Markdown
Author

surim0n commented May 20, 2026

Fresh local verification for review:

  • bun install --frozen-lockfile -> no changes
  • bun test tests/routes/payments.test.ts -> 2 passed
  • bun test -> 4 passed
  • bunx biome check lib/db/schema.ts lib/db/db-client.ts routes/payments tests/routes/payments.test.ts README.md -> passed
  • bun run build -> bundled successfully
  • bunx tsc --noEmit -> passed
  • git diff --check -> passed

Functional demo path: the payment route test sends a fake payment, lists payments, fetches the created payment, completes it, verifies idempotent send replay with the same idempotency_key, and verifies terminal-status protection so a completed payment cannot be moved again.

This keeps the PR reviewable and avoids pretending a 40-file mega-patch is a personality trait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant