{"id":39232185,"url":"https://github.com/perusworld/node-qkr-api-server","last_synced_at":"2026-01-17T23:42:30.195Z","repository":{"id":22285956,"uuid":"95831476","full_name":"perusworld/node-qkr-api-server","owner":"perusworld","description":"Simple Server to front Mastercard Qkr! APIs","archived":false,"fork":false,"pushed_at":"2023-11-27T21:41:55.000Z","size":443,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T09:59:29.651Z","etag":null,"topics":["mastercard-qkr","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/perusworld.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}},"created_at":"2017-06-30T00:26:12.000Z","updated_at":"2022-06-01T18:09:10.000Z","dependencies_parsed_at":"2023-01-13T21:56:22.895Z","dependency_job_id":null,"html_url":"https://github.com/perusworld/node-qkr-api-server","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/perusworld/node-qkr-api-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perusworld%2Fnode-qkr-api-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perusworld%2Fnode-qkr-api-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perusworld%2Fnode-qkr-api-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perusworld%2Fnode-qkr-api-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perusworld","download_url":"https://codeload.github.com/perusworld/node-qkr-api-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perusworld%2Fnode-qkr-api-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28522313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["mastercard-qkr","nodejs"],"created_at":"2026-01-17T23:42:29.538Z","updated_at":"2026-01-17T23:42:30.186Z","avatar_url":"https://github.com/perusworld.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Server to front Mastercard Qkr! APIs #\n\n[![bitHound Overall Score](https://www.bithound.io/github/perusworld/node-qkr-api-server/badges/score.svg)](https://www.bithound.io/github/perusworld/node-qkr-api-server)\n[![bitHound Dependencies](https://www.bithound.io/github/perusworld/node-qkr-api-server/badges/dependencies.svg)](https://www.bithound.io/github/perusworld/node-qkr-api-server/master/dependencies/npm)\n[![bitHound Code](https://www.bithound.io/github/perusworld/node-qkr-api-server/badges/code.svg)](https://www.bithound.io/github/perusworld/node-qkr-api-server)\n\n\nYou could use this to host your backend services that can house calls to Mastercard Qkr! APIs.\n\nIf you are looking to call Qkr! APIs directly then head over to [node-qkr-api](https://github.com/perusworld/node-qkr-api)\n\nIf you are looking to build a mobile app using the server APIs then head over to [qkr-mobile-app](https://github.com/perusworld/qkr-mobile-app)\n\nYou can add your API call authentication logic in [api.ts](./src/api.ts) marked by\n```javascript\n//TODO: Your API Request Authentication Logic\n```\n\n## Demo Video ##\n\ncurl,postman calls \n---\n[![node-qkr-api-server - Qkr API Server Demo (curl, postman)](https://img.youtube.com/vi/Bot4S__zANc/1.jpg)](https://youtu.be/Bot4S__zANc)\n\n## Run ##\n- Bash\n```bash\nexport QKR_PUBLIC_KEY=\"---qkr-public-key---\"\nexport QKR_PRIVATE_KEY=\"---qkr-private-key---\"\nexport QKR_URL=\"---qkr-sandbox-or-production-url---\"\nnpm run build \u0026\u0026 npm start\n```\n - Powershell\n```powershell\n$env:QKR_PUBLIC_KEY=\"---qkr-public-key---\"\n$env:QKR_PRIVATE_KEY=\"---qkr-private-key---\"\n$env:QKR_URL=\"---qkr-sandbox-or-production-url---\"\nnpm run build ; npm start\n```\n-Heroku\n```bash\nheroku create yourappserver\nheroku config:set NPM_CONFIG_PRODUCTION=false\nheroku config:set QKR_PUBLIC_KEY=\"---qkr-public-key---\"\nheroku config:set QKR_PRIVATE_KEY=\"---qkr-private-key---\"\nheroku config:set QKR_URL=\"---qkr-sandbox-or-production-url---\"\ngit push heroku master\n```\n\n### Enabling simple API Key based authentication ###\n- Bash\n```bash\nexport QKR_PUBLIC_KEY=\"---qkr-public-key---\"\nexport QKR_PRIVATE_KEY=\"---qkr-private-key---\"\nexport QKR_URL=\"---qkr-sandbox-or-production-url---\"\nexport API_KEY_ENABLED=\"true\"\nexport API_KEY_SOURCE=\"request\"\nexport API_KEY_NAME=\"yourKeyName\"\nexport API_KEY_VALUE=\"yourKeyValue\"\nnpm run build \u0026\u0026 npm start\n```\n - Powershell\n```powershell\n$env:QKR_PUBLIC_KEY=\"---qkr-public-key---\"\n$env:QKR_PRIVATE_KEY=\"---qkr-private-key---\"\n$env:QKR_URL=\"---qkr-sandbox-or-production-url---\"\n$env:API_KEY_ENABLED=\"true\"\n$env:API_KEY_SOURCE=\"request\"\n$env:API_KEY_NAME=\"yourKeyName\"\n$env:API_KEY_VALUE=\"yourKeyValue\"\nnpm run build ; npm start\n```\n-Heroku\n```bash\nheroku create yourappserver\nheroku config:set NPM_CONFIG_PRODUCTION=false\nheroku config:set QKR_PUBLIC_KEY=\"---qkr-public-key---\"\nheroku config:set QKR_PRIVATE_KEY=\"---qkr-private-key---\"\nheroku config:set QKR_URL=\"---qkr-sandbox-or-production-url---\"\nheroku config:set API_KEY_ENABLED=\"true\"\nheroku config:set API_KEY_SOURCE=\"request\"\nheroku config:set API_KEY_NAME=\"yourKeyName\"\nheroku config:set API_KEY_VALUE=\"yourKeyValue\"\ngit push heroku master\n```\n\n\n## Test Calls (the [test](./test) folder contains sample test calls as well) ##\n### There is also a postman collection of calls that you can directly import from [node-qkr-api-server sample postman calls collection](./node-qkr-api-server.postman_collection.json) ###\n### Lightbox ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/lightbox \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"countryOfResidence\":\"US\",\"callbackUrl\":\"myapp://lightbox\"}'\n```\n### Login ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/login \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"someemail@somedomain.com\",\"pwd\":\"somepassword99\"}'\n```\n### Merchant List ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/merchant/list \\\n  --header 'cache-control: no-cache' \n```\n### Product List ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/product/list \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"id\":\"155952\"}'\n```\n### Cart Add ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/cart/add \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\": \"logintoken\",\"request\":{\"locatedScanId\": \"155955\",\"outletId\": \"155942\",\"purchaseNote\": \"Some note\",\"quantity\": 1,\"variantId\": \"155954\"}}'\n```\n### Card List ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/card/list \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\": \"logintoken\"}'\n```\n### Cart List ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/cart/list \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\": \"logintoken\"}'\n```\n### Cart Checkout ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/cart/checkout \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\": \"logintoken\",\"request\":{\"amountMinorUnits\": \"200\",\"cardId\": \"1\",\"cartId\": \"1\",\"tipAmount\": 0}}'\n```\n### Address List ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/address/list \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\": \"logintoken\"}'\n```\n### Address Add ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/address/add \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\": \"---your-auth-token---\",\"request\":{\"city\": \"San Carlos\",\"country\": \"US\",\"line1\": \"Mastercard\",\"line2\": \"959 Skyway Rd\",\"zip\": \"94070\",\"state\": \"CA\",\"alias\": \"somealias\",\"isDefault\": \"false\",\"recipientName\": \"John Doe\",\"recipientPhone\":\"--your-optional-phone-number--\",\"recipientPhoneCountryCode\":\"1\"}}'\n```\n### Address Delete ###\n```bash\ncurl --request DELETE \\\n  --url http://localhost:3000/api/v1/address/delete \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\": \"logintoken\", \"id\": \"---address-id---\"}'\n```\n### Express Checkout ###\n```diff\n- Make sure the partnerTxId is unique per call\n```\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/express/checkout \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\": \"---your-auth-token---\",\"request\":{\"amount\": \"200\",\"cardId\": \"c0b37d63-4c2b-4677-a956-522761914ee1\",\"description\": \"some description\",\"outletId\":\"155942\",\"partnerTxId\": \"some tx id\"}}'\n```\n### User Profile ###\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/api/v1/profile \\\n  --header 'cache-control: no-cache' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\": \"---your-auth-token---\",\"id\":\"---internalAccountId-from-authresponse---\"}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperusworld%2Fnode-qkr-api-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperusworld%2Fnode-qkr-api-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperusworld%2Fnode-qkr-api-server/lists"}