Skip to content

[BACKEND] Add an idempotency key to the transfer endpoint #41

Description

@Trovic1

Summary

Accept an optional Idempotency-Key header so a retried transfer request does not double-charge.

Scope

  • backend only

Likely files

  • src/routes/WalletRoutes.js
  • src/services/WalletService.js
  • src/models/Transaction.js

Acceptance criteria

  • Same key + same payload returns the original result without re-running the transfer
  • Keys expire or are scoped per user
  • Works within the existing atomic transaction flow

Verification

  • Replay an identical transfer with the same key and confirm only one debit

Labels: backend, enhancement, help wanted


Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend / API workenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions