{"id":37787424,"url":"https://github.com/fawry-api/fawry-node","last_synced_at":"2026-01-16T15:13:42.242Z","repository":{"id":57233560,"uuid":"220624524","full_name":"fawry-api/fawry-node","owner":"fawry-api","description":"A plug-and-play library to interface with Fawry's payment gateway API (charge, refund, payment status, service callback).","archived":false,"fork":false,"pushed_at":"2019-11-10T23:51:51.000Z","size":15,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-09T06:09:53.790Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fawry-api.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-09T10:12:46.000Z","updated_at":"2025-01-07T18:00:52.000Z","dependencies_parsed_at":"2022-08-26T15:32:52.784Z","dependency_job_id":null,"html_url":"https://github.com/fawry-api/fawry-node","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fawry-api/fawry-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fawry-api%2Ffawry-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fawry-api%2Ffawry-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fawry-api%2Ffawry-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fawry-api%2Ffawry-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fawry-api","download_url":"https://codeload.github.com/fawry-api/fawry-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fawry-api%2Ffawry-node/sbom","scorecard":{"id":394020,"data":{"date":"2025-08-11","repo":{"name":"github.com/fawry-api/fawry-node","commit":"2f166e708ffe9e7f7c049e0bdaf0d9135c087958"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T18:30:58.741Z","repository_id":57233560,"created_at":"2025-08-18T18:30:58.741Z","updated_at":"2025-08-18T18:30:58.741Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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-01-16T15:13:41.571Z","updated_at":"2026-01-16T15:13:42.234Z","avatar_url":"https://github.com/fawry-api.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fawry-node [![Build Status](https://travis-ci.com/fawry-api/fawry-node.svg?branch=master)](https://travis-ci.com/fawry-api/fawry-node) [![codecov](https://codecov.io/gh/fawry-api/fawry-node/badge.svg?branch=master)](https://codecov.io/gh/fawry-api/fawry-node?branch=master)\n\n\n## Install\n\nThe module depends on http module as a peer dependency.\nIn the future it will be pluggable with:\n\n  - [x] [axios](https://github.com/axios/axios)\n  - [ ] [request](https://github.com/request/request)\n  - [ ] [superagent](https://github.com/visionmedia/superagent)\n  - [ ] [got](https://github.com/sindresorhus/got)\n  - [ ] [node-fetch](https://github.com/bitinn/node-fetch)\n\nPlease make sure to add to your project one of the supported above modules.\n\n```\n$ npm install fawry-node\n```\n\n## Usage\n\n```js\nconst fawry = require('fawry-node');\n\n/*\n  params: the object you got at the callback context\n  does: throws an error if messageSignature doesn't match the generated one using your secure key\n  return: insertedParams if falid\n*/\n\nfawry.validateCallbackParams({\n  fawrySecureKey: '\u003cfawry_secure_key\u003e',\n  params: {\n    requestId: 'c72827d084ea4b88949d91dd2db4996e',\n    fawryRefNumber: '970177',\n    merchantRefNumber: '9708f1cea8b5426cb57922df51b7f790',\n    customerMobile: '01004545545',\n    customerMail: 'fawry@fawry.com',\n    paymentAmount: '152.00',\n    orderAmount: '150.00',\n    fawryFees: '2.00',\n    shippingFees: '',\n    orderStatus: 'NEW',\n    paymentMethod: 'PAYATFAWRY',\n    messageSignature: 'b0175565323e464b01dc9407160368af5568196997fb6e379374a4f4fbbcf587',\n    orderExpiryDate: 1533554719314,\n    orderItems: [{\n      itemCode: 'e6aacbd5a498487ab1a10ae71061535d',\n      price: '150.00',\n      quantity: 1\n    }]\n  }\n});\n\n/*\n  params: config * for details check contracts/init.js\n  does: leverages JS closure to initialize a Fawry instance with common configration\n  return: {\n    request // http client instance you could intercept, transform do whatever the http module supports\n    charge,\n    refund,\n    status\n  }\n*/\nconst fawryClient = fawry.init({\n  isSandbox: true,\n  fawrySecureKey: '\u003cfawry_secure_key\u003e'\n});\n\n\n/*\n  params: data * for details check contracts/charge.js\n  does: sends a post request with your valid fawry options to the /charge endpint\n  return: Promise\n*/\n\nfawryClient.charge({\n  merchantCode: '\u003cmerchant_code\u003e',\n  merchantRefNum: 'io5jxf3jp27kfh8m719arcqgw7izo7db',\n  customerProfileId: 'ocvsydvbu2gcp528wvl64i9z5srdalg5',\n  customerMobile: '012345678901',\n  paymentMethod: 'PAYATFAWRY',\n  currencyCode: 'EGP',\n  amount: '17.20',\n  description: 'the charge request description',\n  chargeItems: [{\n    itemId: 'fk3fn9flk8et9a5t9w3c5h3oc684ivho',\n    description: 'desc',\n    price: '17.20',\n    quantity: 1\n  }]\n});\n\n/*\n  params: data * for details check contracts/refund.js\n  does: sends a post request with your valid fawry options to the /refund endpint\n  return: Promise\n*/\n\nfawryClient.refund({\n  merchantCode: '\u003cmerchant_code\u003e',\n  referenceNumber: '931337410',\n  refundAmount: '81.13',\n  reason: 'Paid manually'\n});\n\n/*\n  params: params * for details check contracts/status.js\n  does: sends a get request with your valid fawry options to the /status endpint\n  return: Promise\n*/\n\nfawryClient.status({\n  merchantCode: '\u003cmerchant_code\u003e',\n  merchantRefNumber: 'ssshxb98phmyvm434es62kage3nsm2cj'\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffawry-api%2Ffawry-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffawry-api%2Ffawry-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffawry-api%2Ffawry-node/lists"}