Parent PRD
Source: plans/cryplo-bridge.md — ExSize ↔ Cryplo Bridge
What to build
Implement deposit transfers so authenticated Cryplo users can convert ExCoin to USD in Cryplo.
End-to-end: Cryplo calls POST /api/cryplo/deposit with Bearer token + amount_usd + cryplo_user_id → ExSize verifies token → checks ExBucks balance (amount_usd / 2 = excoin_amount) → deducts ExBucks → records transfer in cryplo_transfers → returns success with new balance.
Also includes GET /api/cryplo/balance for Cryplo to check a user's ExCoin balance.
This includes:
New cryplo_transfers table (id, exsize_user_id, type, amount_usd, excoin_amount, status, cryplo_tx_id, created_at, completed_at)
POST /api/cryplo/deposit — deducts ExBucks, records transfer
GET /api/cryplo/balance — returns current ExBucks balance
All endpoints require Bearer token auth (API token from Cryplo Bridge: API Token Infrastructure + SSO Verify #56 )
Acceptance criteria
Blocked by
User stories addressed
Deposit transfer (ExCoin → Cryplo USD)
Balance check endpoint
Parent PRD
Source:
plans/cryplo-bridge.md— ExSize ↔ Cryplo BridgeWhat to build
Implement deposit transfers so authenticated Cryplo users can convert ExCoin to USD in Cryplo.
End-to-end: Cryplo calls
POST /api/cryplo/depositwith Bearer token + amount_usd + cryplo_user_id → ExSize verifies token → checks ExBucks balance (amount_usd / 2 = excoin_amount) → deducts ExBucks → records transfer incryplo_transfers→ returns success with new balance.Also includes
GET /api/cryplo/balancefor Cryplo to check a user's ExCoin balance.This includes:
cryplo_transferstable (id, exsize_user_id, type, amount_usd, excoin_amount, status, cryplo_tx_id, created_at, completed_at)POST /api/cryplo/deposit— deducts ExBucks, records transferGET /api/cryplo/balance— returns current ExBucks balanceAcceptance criteria
cryplo_transferstable created with proper indexesPOST /api/cryplo/depositdeducts ExBucks from user (1 ExCoin = 2 USD)insufficient_fundsif balance too lowcryplo_transferswith status 'completed'GET /api/cryplo/balancereturns{excoin_balance, user_id}for authenticated useruv run pytest tests/ -xBlocked by
User stories addressed