-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Labels
Medium priorityCreated by Linear-GitHub SyncCreated by Linear-GitHub Syncapiarea: API, enterprise API, access token, OAutharea: API, enterprise API, access token, OAuth🐛 bugSomething isn't workingSomething isn't working
Description
Summary
GET /payments and GET /payments/[id] on the Platform API are returning Zod validation errors, blocking consumers from retrieving the paymentUid used for abandoned-cart recovery links.
Proposed Solution
- Identify and fix the schema mismatch causing Zod parse failures on both endpoints.
- Align response payloads with the published/expected types; ensure paymentUid is included when available.
- Add robust request/response validation with clear error messaging (non-200 paths).
- Backfill unit/integration tests for both endpoints, including happy paths and failure cases.
Acceptance Criteria
- Calling GET /payments returns 200 with a validated array payload; no Zod errors.
- Calling GET /payments/[id] returns 200 with a validated object payload; no Zod errors.
- paymentUid is present when applicable and typed correctly.
- Invalid ID returns 404 with a typed error object (no Zod stack traces).
- Contract tests added (and passing) for: list, by-id, invalid-id, and schema shape.
- Docs updated to reflect the final response schema.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Medium priorityCreated by Linear-GitHub SyncCreated by Linear-GitHub Syncapiarea: API, enterprise API, access token, OAutharea: API, enterprise API, access token, OAuth🐛 bugSomething isn't workingSomething isn't working