{"id":48783316,"url":"https://github.com/dk00/kk-pudding","last_synced_at":"2026-04-13T15:03:04.827Z","repository":{"id":169032629,"uuid":"644897617","full_name":"dk00/kk-pudding","owner":"dk00","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-24T05:58:05.000Z","size":151,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-24T13:10:23.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dk00.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-24T13:34:21.000Z","updated_at":"2024-02-29T10:54:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"aaecacae-f92b-4d1b-9be9-989093c183fc","html_url":"https://github.com/dk00/kk-pudding","commit_stats":null,"previous_names":["dk00/kk-pudding"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dk00/kk-pudding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dk00%2Fkk-pudding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dk00%2Fkk-pudding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dk00%2Fkk-pudding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dk00%2Fkk-pudding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dk00","download_url":"https://codeload.github.com/dk00/kk-pudding/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dk00%2Fkk-pudding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31757482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T13:27:56.013Z","status":"ssl_error","status_checked_at":"2026-04-13T13:21:23.512Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-13T15:02:44.728Z","updated_at":"2026-04-13T15:03:04.809Z","avatar_url":"https://github.com/dk00.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KK Pudding\n\n## Endpoints\n\n- `https://pudding-delta.vercel.app/api/pudding?vid=\u003cmachine-alias\u003e\u0026staffId=\u003cyour-staff-id\u003e`\n\n## Reverse Engineering\n\nAPI doesn't provide CORS headers, a proxy is required to get result of the API.\n\nIt poll status every `3` seconds:\n\n```js\nfetch(\"https://pay.yallvend.com/epay/model/payment_api\", {\n  \"headers\": {\n  },\n  \"body\": \"key=\u003capi-key\u003e\u0026func=loadDefaultAmount\u0026vidCode=\u003cmachine-id\u003e\",\n  \"method\": \"POST\",\n});\n```\n\nresponse(no selection): \n\n```json\n{\"status\":200,\"defaultAmount\":0,\"amountCh\":\"0\"}\n```\n\nresponse(selected):\n\n```json\n{\"status\":200,\"defaultAmount\":15,\"amountCh\":\"11\"}\n```\n\nIf submit before the status is updated, it displays error and do nothing.\n\nIt's possible to customize the UI since there's kkcompany specific page, but it may take ages to be done...\n\n**Actual Pay API**\n\nWorking code snippet to drop a drink:\n\n```js\nconst data = {\n  vid: '\u003cmachine-id\u003e', // last part of QR code URL, every machine has its own\n  staff_id: 'your-staff-id',\n  amount: '15', // must match the number displayed on the machine\n  uuid: '111',\n  haveAuth: false,\n}\n\nfetch('https://pay.yallvend.com/epay/staff/staff.php', {\n  method: 'POST',\n  headers: {\n    'content-type': 'application/x-www-form-urlencoded',\n  },\n  body: `data=${encodeURIComponent(JSON.stringify(data))}`,\n})\n  .then(it =\u003e it.json())\n  .then(result =\u003e console.log(result))\n```\n\n\nIf pay with a non existing staff id:\n\n```js\n{status: 'fail', statusCode: 400, error: '未知錯誤 105'}\n```\n\n**Machines**\n\n| Location                                                                           | vid                              |\n| ---------------------------------------------------------------------------------- | -------------------------------- |\n| [E8 West](https://pay.yallvend.com/kkcompany?vid=60474a49f9075f39bc72c52b5b348609) | 60474a49f9075f39bc72c52b5b348609 |\n| [E8 East](https://pay.yallvend.com/kkcompany?vid=faa62cfd575a3de6d43098c0af1b4933) | faa62cfd575a3de6d43098c0af1b4933 |\n| [KH East](https://pay.yallvend.com/kkcompany?vid=47ee91a0af98e749754f30cf7d756164) | 47ee91a0af98e749754f30cf7d756164 |\n| [KH West](https://pay.yallvend.com/kkcompany?vid=d714f0cd4123bde0a25b1a6adab930e3) | d714f0cd4123bde0a25b1a6adab930e3 |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdk00%2Fkk-pudding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdk00%2Fkk-pudding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdk00%2Fkk-pudding/lists"}