Skip to content

feat(transfers): instant account-to-account transfer rail - #988

Merged
github-actions[bot] merged 2 commits into
Smartdevs17:mainfrom
davidsoniaudin2-oss:feat/913-instant-account-transfers
Sep 28, 2026
Merged

github-actions[bot] merged 2 commits into
Smartdevs17:mainfrom
davidsoniaudin2-oss:feat/913-instant-account-transfers

Conversation

@davidsoniaudin2-oss

Copy link
Copy Markdown
Contributor

Summary

Closes #913.

Adds a real-time account-to-account transfer rail: accounts are registered and validated before money moves, a short-lived quote locks the fee and FX rate shown to the customer, and transfers are initiated behind an idempotency key so retries never double-charge.

What changed

  • backend/src/services/transfers.ts — TransferService with quote pricing (0.5% fee, 0.50 floor, 25.00 cap), idempotent initiation, per-transfer (25k) and rolling 24h (100k) velocity limits, synchronous instant settlement, cancellation of unsettled transfers, and 24h post-settlement reversals.
  • backend/src/routes/transfers.ts — REST API mounted at /api/v1/transfers (accounts, quotes, transfers, cancel, reverse, volume).
  • backend/src/index.ts — router registration.
  • docs/INSTANT_TRANSFERS.md — feature documentation.

Behaviour notes

  • Same-currency instant-rail transfers settle before the response returns; future-dated transfers stay pending on the standard rail and can be cancelled.
  • Idempotency accepts the Idempotency-Key header or a body field.
  • Service errors carry proper status codes (400/403/404/409) via a local serviceHandler wrapper.

Tests

backend/src/services/__tests__/instant-transfers.test.ts — 32 tests covering quotes/fees/FX, expiry, idempotency, limits, settlement, cancellation, reversal, and filtering. All passing; typecheck and lint clean for the new files.

Verification

cd backend && npx vitest run src/services/__tests__/instant-transfers.test.ts

@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

@davidsoniaudin2-oss is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

davidsoniaudin2-oss and others added 2 commits September 28, 2026 03:45
…7#913)

Adds a real-time A2A transfer service with short-lived quotes that lock
fees and FX rates, idempotent initiation to prevent double-charges,
per-transfer and rolling 24h velocity limits, cancellation of unsettled
transfers, and post-settlement reversals.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@davidsoniaudin2-oss
davidsoniaudin2-oss force-pushed the feat/913-instant-account-transfers branch from 894c99f to 3296c9b Compare September 28, 2026 03:46
@drips-wave

drips-wave Bot commented Sep 28, 2026

Copy link
Copy Markdown

@davidsoniaudin2-oss Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@github-actions
github-actions Bot merged commit ff9421c into Smartdevs17:main Sep 28, 2026
14 of 25 checks passed
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.

Add support for instant account-to-account transfers

1 participant