Skip to content

Add fake payment API#39

Open
thepianistdirector wants to merge 1 commit into
tscircuit:mainfrom
thepianistdirector:codex/fake-payment-api
Open

Add fake payment API#39
thepianistdirector wants to merge 1 commit into
tscircuit:mainfrom
thepianistdirector:codex/fake-payment-api

Conversation

@thepianistdirector
Copy link
Copy Markdown

/claim #1

Summary

  • Add an in-memory fake payment record model and DB helpers.
  • Add send, list, get, complete, and cancel payment routes with validation.
  • Add idempotency-key replay protection for retry-safe sends and status-transition guards.
  • Document the payment API in the README and cover the lifecycle with route tests.

Validation

  • npx.cmd bun test
  • .\node_modules\.bin\biome.exe check README.md lib\db\schema.ts lib\db\db-client.ts routes\payments\send.ts routes\payments\list.ts routes\payments\get.ts routes\payments\complete.ts routes\payments\cancel.ts tests\routes\payments.test.ts
  • .\node_modules\.bin\tsc.exe --noEmit
  • npx.cmd bun run build
  • git diff --check

Transparency: AI-assisted with Codex; I reviewed the diff and kept the change scoped to the fake payment API.

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