Skip to content

Add fake payment API lifecycle#10

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

Add fake payment API lifecycle#10
J3d1-fm wants to merge 1 commit into
tscircuit:mainfrom
J3d1-fm:codex/fake-payment-api

Conversation

@J3d1-fm
Copy link
Copy Markdown

@J3d1-fm J3d1-fm commented May 11, 2026

Adds a Winterspec-native fake payment API for issue #1.

Implemented endpoints:

  • POST /payments/send
  • GET /payments/list
  • GET /payments/get
  • POST /payments/complete
  • POST /payments/cancel

The send endpoint supports optional idempotency keys so retries return the original fake payment instead of creating duplicates. Payment records are persisted in the existing in-memory zod/zustand DB and can be filtered by status, recipient, or repository.

Verification:

  • /private/tmp/bun-runtime/bun-darwin-aarch64/bun test
  • /private/tmp/bun-runtime/bun-darwin-aarch64/bun x biome check 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/payments.test.ts
  • /private/tmp/bun-runtime/bun-darwin-aarch64/bun run build

/claim #1

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