{ "shell": { "title": "लटरी इन्टिग्रेसन दस्तावेज", "admin": "Admin", "adminLogin": "Admin console" }, "nav": { "overview": "अवलोकन", "api": "API", "ship": "लाइभ", "home": "सारांश", "delivery": "इन्टिग्रेसन वितरण", "quickstart": "छिटो सुरु", "fundamentals": "रकम मोडेल", "setup": "सेटअप", "sso": "SSO", "iframe": "iframe प्रोटोकल", "wallet": "वालेट गेटवे", "transfer": "स्थानान्तरण (सन्दर्भ)", "errors": "त्रुटि कोड", "troubleshooting": "समस्या निवारण", "golive": "लाइभ सूची", "operations": "सञ्चालन", "adminGuide": "Admin Guide", "apiReference": "API Reference" }, "headers": { "component": ["कम्पोनेन्ट", "भूमिका", "मालिक"], "convention": ["वस्तु", "नियम"], "claim": ["Claim", "Type", "Req", "Note"], "param": ["प्यारामिटर", "उद्देश्य"], "methodPath": ["Method", "Path", ""], "query": ["Query", "Type", ""], "field": ["Field", "Type", "Note"], "code": ["Code", "Message"], "http": ["Status", "message", "Cause"], "message": ["Dir", "type", "Payload"], "balance": ["फिल्ड", "खाता", "नोट"], "call": ["दिशा", "API", "Auth"], "sequence": ["चरण", "अभिनेता", "कार्य"], "envMap": ["वस्तु", "Admin साइट", "मुख्य .env", "नोट"], "account": ["प्रयोगकर्ता", "पासवर्ड", "site_player_id"], "contract": ["परिदृश्य", "HTTP", "Body"], "adminField": ["फिल्ड", "नोट", "उदाहरण"], "handoffTable": ["वस्तु", "विवरण", "जिम्मेवार"], "env": ["Environment", "Address example", "Note"], "envelopeTable": ["Dir", "Message fields", "Note"], "faq": ["Symptom", "Troubleshooting"] }, "pages": { "overview": { "title": "Integration overview", "description": "For main-site developers / integration engineers. You implement: JWT signing + wallet gateway; lottery provides H5 and API.", "roles": "Roles", "flow": "Business flow", "e2eSequence": "End-to-end sequence", "conventions": "Conventions", "readingOrder": "Suggested reading order", "matrix": [ ["Main site (partner)", "User login; server-side JWT; wallet gateway", "Partner"], ["Lottery API (us)", "JWT verify, transfer, bet, draw, settlement", "Us"], ["Lottery H5 (us)", "Player UI; iframe or URL entry", "Us"] ], "flowItems": [ "User logs in on main site → main site server issues short-lived JWT", "Enter lottery H5 (iframe embed or URL ?token= redirect)", "Player taps transfer-in in H5 → lottery calls main site debit → lottery balance credited", "Player bets / wins in H5 (uses lottery balance)", "(Optional) Player taps transfer-out in H5 → lottery calls main site credit" ], "e2eRows": [ ["1", "Main site", "User login; server issues JWT (site_code, site_player_id)"], ["2", "Main site", "Embed lottery H5 iframe, or redirect to lottery_h5_base_url/?token="], ["3", "Lottery H5", "Receives JWT; calls GET /api/v1/player/me to verify and auto-provision"], ["4", "Player", "Taps transfer-in in H5"], ["5", "Lottery API", "Server calls main site POST /wallet/debit-for-lottery"], ["6", "Main wallet", "Debit main_balance; return success: true"], ["7", "Lottery API", "Credit lottery balance"], ["8", "Player", "Bets / waits for settlement in H5"], ["9", "Player", "(Optional) taps transfer-out in H5"], ["10", "Lottery API", "Calls main site POST /wallet/credit-from-lottery"] ], "conventionRows": [ ["Amount", "Minor integer units, e.g. 2000 = 20.00 NPR"], ["Encoding", "UTF-8 JSON"], ["Time", "JWT uses Unix seconds (iat / exp); recommend exp - iat ≤ 300 seconds"], ["Player API auth", "Authorization: Bearer {JWT} (main site signs, lottery verifies)"], ["Wallet gateway auth", "Authorization: Bearer {wallet_api_key} (lottery sends on callback)"] ], "readingItems": [ "Integration delivery — confirm deliverables and environment URLs", "Quick start — first integration pass", "Setup — admin site provisioning and key mapping", "SSO → iframe protocol → wallet gateway", "Troubleshooting — common issues", "Go-live checklist — production release checks" ] }, "delivery": { "title": "Integration delivery", "description": "Before integration testing, confirm the following deliverables with sales / support. Test and production environments must be fully isolated.", "handoffScope": "Integration scope (what you need to do)", "weProvide": "We provide", "youProvide": "Partner provides", "environment": "Environment URLs", "process": "Typical integration process", "note": "Secrets (sso_jwt_secret, wallet_api_key) are shown only once after creation — save them securely immediately. Store secrets on the main-site server only; never in frontend or mobile apps. URLs below are Tanumo current defaults; partner deployments follow sales delivery.", "handoffRows": [ ["JWT signing", "Main site server issues HS256 JWT after login; no token-exchange login API", "Partner"], ["Wallet gateway", "Implement balance / debit / credit over HTTPS", "Partner"], ["iframe or URL entry", "Embed lottery H5 or redirect with JWT", "Partner"], ["Lottery H5 + API", "Games, transfer, bet, draw", "Us"], ["Integration site & keys", "Create site_code and deliver secrets", "Us (super admin)"] ], "provideRows": [ ["site_code", "Site code written into JWT"], ["sso_jwt_secret", "JWT signing secret (held by main site)"], ["wallet_api_key", "Bearer secret when lottery calls wallet gateway"], ["lottery_h5_base_url", "Lottery H5 entry; default https://front.tanumo.com"], ["lottery_api_base_url", "Lottery API base; default https://lotterylaravel.tanumo.com"] ], "submitRows": [ ["wallet_api_url", "Partner wallet gateway HTTPS root (publicly reachable)"], ["iframe_allowed_origins", "Main-site origin allowlist (required for iframe; one per line)"], ["Test accounts", "Several site_player_id values with initial main_balance"], ["Egress IP (if needed)", "If gateway uses IP allowlist, request lottery server egress IP"] ], "environmentRows": [ ["Lottery API", "https://lotterylaravel.tanumo.com", "curl: GET /api/v1/player/me"], ["Lottery H5 entry", "https://front.tanumo.com", "iframe / ?token=; wallet example /wallet"], ["Integration docs", "https://lotteryadmin.tanumo.com/docs/integration", "Public documentation"], ["Admin console", "https://lotteryadmin.tanumo.com/admin", "Super admin; Config → Integration sites"], ["Production", "Separate domain and secrets", "site_code, secrets, domains not shared with staging"] ], "processSteps": [ "Sales opens integration → our super admin creates integration site and delivers keys + H5 URL", "Partner implements three wallet endpoints on public HTTPS (tunnel OK for staging)", "Partner fills wallet_api_url, iframe_allowed_origins in admin; run connectivity test", "Partner implements JWT signing and iframe postMessage (or URL redirect)", "Complete integration using Quick start acceptance checklist", "Production: new site, new secrets, full end-to-end retest before go-live" ] }, "quickstart": { "title": "छिटो सुरु", "description": "Assumes Integration delivery is done and you have site_code, secrets, and H5 URL. Follow these steps for first integration pass.", "prereq": "पूर्वशर्त", "steps": "Integration steps", "acceptance": "Acceptance checklist", "note": "JWT must be signed on the main-site server only — never hard-code sso_jwt_secret in frontend. Production wallet_api_url must be public HTTPS.", "prereqItems": [ "Received site_code, sso_jwt_secret, wallet_api_key, lottery_h5_base_url", "Main site implements GET /wallet/balance, POST /wallet/debit-for-lottery, POST /wallet/credit-from-lottery", "Admin integration site has wallet_api_url and iframe_allowed_origins; connectivity test passed", "At least one test site_player_id with sufficient main_balance" ], "stepItems": [ "Main-site server implements JWT signing (see SSO jsonwebtoken example)", "Self-test with curl: Bearer JWT on GET https://lotterylaravel.tanumo.com/api/v1/player/me → code=0", "Embed