web/website/node/postbank-contract.mjs

10 lines
4.3 KiB
JavaScript

export const POSTBANK_CONTRACTS=Object.freeze({
statements:{title:'Monthly account statement archive',state:'active',request:{method:'GET',path:'/api/bank/statements/archive',fields:['accountId','page']},response:{records:'closed months with ready/preparing status and download metadata'},note:'The trusted bank ticker automatically seeds and prepares closed-month PDF statements. Users only list and download already archived files through GET /api/bank/statements?accountId=...&month=.... No user generation endpoint. Brussels month boundaries; ledger history remains preserved. Recoverable worker claims, 25 statements per tick and one-minute continuation while a backlog remains.'},
server:{title:'Game server link',state:'not_linked',request:{method:'POST',path:'/api/bank/integrations/game/payments',fields:['requestId','sourceAccount','targetNumber','amount','reference','mode','gameReceipt']},response:{paymentId:'unique payment reference',state:'queued | posted | rejected'},note:'Future trusted server-to-server payment instructions only. The central bank authorises, reserves and posts; Java must not duplicate accounting or own bank balances. Standard instructions follow the same four-hour Brussels windows; instant instructions post immediately within bank limits. requestId is retained on retries and fulfilment waits for a confirmed posted bank result. No game link or request is enabled by this placeholder. Server credentials must never be supplied by a browser.'},
mandates:{title:'Account authorisations',state:'active',request:{method:'POST',path:'/api/bank/authorisations/change',fields:['requestId','accountId','action','kind','key','canPay','expiresAt','version','confirmed']},response:{ok:'confirmed mandate change',replayed:'idempotent retry'},note:'Per-account user/rank mandates. Protected system and collateral accounts cannot be assigned through this route. Current membership and expiry are rechecked before payment settlement.'},
collateral:{title:'Blocked collateral',state:'prepared',request:{method:'GET',path:'/api/bank/credit/overview',fields:[]},response:{accounts:'loan records and pledged DM amounts; type106 accounts are read through normal authorised bank views'},note:'Not an investment product. Borrowers cannot transfer collateral out. Only authorised credit repayment/release and bank staff recovery actions can move it, with ledger entries and audit.'},
loans:{title:'Credit applications',state:'prepared',request:{method:'POST',path:'/api/bank/credit/apply',fields:['requestId','accountId','productKey','amount','months','monthly','motivation','accepted','termsVersion']},response:{applicationId:'application reference',state:'submitted | approved_pending'},note:'Authoritative central API. Ordinary credit needs staff review and separate borrower acceptance. Launch grants need explicit borrower consent. Treasury liquidity and collateral are reserved before the four-hour ticker disburses. The deployed activation flag controls intake.'},
gameCredit:{title:'Future game credit interface',state:'not_linked',request:{method:'POST',path:'/api/bank/integrations/game/credit',fields:['requestId','playerUuid','action','loanId','productKey','amount','months','monthly','motivation','confirmed']},response:{applicationId:'bank-owned contract reference',state:'submitted | queued | active | rejected'},note:'Contract for a future trusted game adapter only, not an implemented browser endpoint. Map a verified game identity to its existing central user/client; delegate to the same credit services and idempotency, never calculate debt in Java or write game balances. No game call is made.'},
companies:{title:'Company registration link',state:'prepared',request:{method:'POST',path:'/api/bank/integrations/entities',fields:['sourceEventId','kind','externalKey','displayName']},response:{entityId:'bank entity reference',state:'not_activated'},note:'Trusted central company-registry event, not a browser endpoint. No companies are invented. Existing approved companies are read from the central registry.'},
economy:{title:'Cost-of-living index',state:'baseline',request:{method:'GET',path:'/api/bank/integrations/economy-index',fields:[]},response:{index:100,base:100,source:'baseline',observedAt:null},note:'No live economy feed is linked. P&O uses the published baseline until an independently verified index is integrated.'}
});