Skip to content

feat: compliance improvements (limit request, stop transaction, chargeback)#3576

Merged
bernd2022 merged 5 commits intodevelopfrom
feature/compliance-improvements
Apr 16, 2026
Merged

feat: compliance improvements (limit request, stop transaction, chargeback)#3576
bernd2022 merged 5 commits intodevelopfrom
feature/compliance-improvements

Conversation

@bernd2022
Copy link
Copy Markdown
Collaborator

Summary

  • Limit Request via support endpoint (bf5f6956addfe3f858): extend CreateSupportIssueSupportDto with optional limitRequest and route to COMPLIANCE department, mirroring the public createIssue endpoint.
  • Stop transaction endpoint (6da95caa2723ee4c7a): new POST /transaction/admin/:id/stop for COMPLIANCE users to halt a BuyCrypto transaction (sets BuyCryptoStatus.STOPPED). Mapper exposes the new STOPPED transaction state.
  • Chargeback endpoint (a0da59e98): new PUT /support/transaction/:id/chargeback to release a refund for BuyCrypto / BuyFiat / unassigned BankTx, recording the agent identity (Compliance/<Vorname>.<Nachname>). Adds GET /support/me, exposes chargebackAsset on the transaction DTO and adds an optional chargebackAmount override on TransactionRefundDto.

Companion PRs

Test plan

  • npm run format:check
  • npm run lint
  • npm test ✅ (66 suites, 927 tests passing)
  • Manual: COMPLIANCE user can call POST /transaction/admin/{id}/stop and the transaction state becomes Stopped.
  • Manual: COMPLIANCE user can call GET /support/transaction/{id}/refund followed by PUT /support/transaction/{id}/chargeback for BuyCrypto, BuyFiat and unassigned BankTx; chargebackAllowedBy records the agent.
  • Manual: GET /support/me returns { id, firstname, surname } of the calling COMPLIANCE user.
  • Manual: COMPLIANCE user can submit a Limit Request via POST /support/issue/... with limitRequest payload; department resolves to COMPLIANCE.

Extend CreateSupportIssueSupportDto with optional limitRequest field
and set department to COMPLIANCE when limitRequest is present, matching
the logic of the public createIssue endpoint. This allows COMPLIANCE
users to create a Limit Request on behalf of a user.
Add PUT /support/transaction/:id/chargeback for COMPLIANCE users to
release a refund for BuyCrypto, BuyFiat or unassigned BankTx, recording
the agent identity in chargebackAllowedBy. Add GET /support/me to
expose the agent's own user data, and chargebackAmount override on
TransactionRefundDto. Expose chargebackAsset on the transaction DTO.
@bernd2022 bernd2022 requested a review from davidleomay April 15, 2026 08:07
Comment thread src/subdomains/core/history/dto/transaction-refund.dto.ts
Comment thread src/subdomains/generic/support/support.controller.ts Outdated
Comment thread src/subdomains/generic/support/support.controller.ts Outdated
Comment thread src/subdomains/supporting/support-issue/support-issue.controller.ts
@bernd2022 bernd2022 requested a review from davidleomay April 16, 2026 08:55
…to compliance

- Merge PUT /refund and PUT /chargeback into single PUT /refund endpoint
- Move chargebackAmount from TransactionRefundDto to new ChargebackRefundDto
- Remove GET /me endpoint, agent name is resolved from JWT server-side
- Remove redundant processTransactionRefund, use unified method for all refund types
@bernd2022 bernd2022 marked this pull request as ready for review April 16, 2026 16:53
@bernd2022 bernd2022 requested a review from TaprootFreak as a code owner April 16, 2026 16:53
@bernd2022 bernd2022 merged commit 5bb2812 into develop Apr 16, 2026
8 checks passed
@bernd2022 bernd2022 deleted the feature/compliance-improvements branch April 16, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants