Repository navigation
Match the real Investec API: transfer responses, profiles, statements - #51
Merged
Merged
Conversation
- transfermultiple/paymultiple return Investec's shape instead of echoing
the request: { TransferResponses: [{ PaymentReferenceNumber (UBP…),
PaymentDate (DD/MM/YYYY), Status, BeneficiaryName,
BeneficiaryAccountId, AuthorisationRequired }], ErrorMessage: null },
one entry per transfer or payment. Field names confirmed against
Investec's developer page and an SDK's types.
- GET /za/pb/v1/profiles and GET /za/pb/v1/profiles/:profileId/accounts.
Paths as in Investec's API collection; Investec doesn't publish the
responses, so the fields are a best match, and the docs say so. Accounts
scope and consented accounts apply. Authorisation setup details are left
out rather than invented.
- Statements accept fromDate/toDate (validated): monthly statements at
each month end in range, newest first, completed months, at most 24.
- Card environment variables report real createdAt/updatedAt (new Card
columns) instead of a fixed 2023 date.
- Dashboard: transfer and payment messages show the payment reference.
Tests: 9 API (test/fidelity.spec.ts), updated transfer/payment tests,
2 unit. 213 API, 43 unit and 17 e2e passing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the emulated API closer to Investec's real one.
Transfer and payment responses (confirmed)
transfermultipleandpaymultiplenow return Investec's shape instead of echoing the request:{ "data": { "TransferResponses": [{ "PaymentReferenceNumber": "UBP2201761367", "PaymentDate": "09/11/2026", "Status": "- No authorisation necessary <BR> - Payment/Transfer effective date 09/11/2026", "BeneficiaryName": "…", "BeneficiaryAccountId": "…", "AuthorisationRequired": false }], "ErrorMessage": null } }One entry per transfer or payment. The field names were checked against Investec's developer page and the
investec-pb-apiSDK's types. The dashboard now shows the payment reference after a transfer or payment.Profiles (best match, not confirmed)
GET /za/pb/v1/profilesandGET /za/pb/v1/profiles/:profileId/accounts.accountsscope, and 3-legged tokens see only consented accounts.Statements
GET …/documentsacceptsfromDate/toDate(validated). It lists monthly statements at each month end in the range, newest first, for completed months only, at most 24.Environment variables
Real
createdAt/updatedAt(newCardcolumns), replacing the fixed 2023 timestamp.Not changed
The toggle-programmable-feature response shape stays as it is, because I couldn't confirm Investec's.
Behaviour change
Clients that read the transfer or payment response body (which used to echo the request) need the new
TransferResponsesshape. Dev databases neednpx prisma migrate deploy.Test plan
test/fidelity.spec.ts: multi-leg transfer responses with unique references, profiles (including consent and scope with auth on), statement filters and validation, env var timestamps. The existing transfer and payment tests are updated to the new shape.referenceSuffix), 17 Playwright tests (the payment message showsref UBP…), lint, typecheck, buildopenapi:check(66 routes), knip🤖 Generated with Claude Code