{"id":20051725,"url":"https://github.com/seerbit/seerbit-reactjs","last_synced_at":"2025-05-05T11:31:52.394Z","repository":{"id":37896527,"uuid":"312770787","full_name":"seerbit/seerbit-reactjs","owner":"seerbit","description":"ReactJS Wrapper for SeerBit","archived":false,"fork":false,"pushed_at":"2023-10-16T10:34:39.000Z","size":398,"stargazers_count":0,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-03T03:39:05.840Z","etag":null,"topics":[],"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/seerbit.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}},"created_at":"2020-11-14T07:48:51.000Z","updated_at":"2023-10-10T21:12:15.000Z","dependencies_parsed_at":"2022-08-20T01:41:38.784Z","dependency_job_id":null,"html_url":"https://github.com/seerbit/seerbit-reactjs","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-reactjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-reactjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-reactjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-reactjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seerbit","download_url":"https://codeload.github.com/seerbit/seerbit-reactjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224443947,"owners_count":17312127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-13T12:05:36.414Z","updated_at":"2025-05-05T11:31:52.385Z","avatar_url":"https://github.com/seerbit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n \u003cimg width=\"200\" valign=\"top\" src=\"https://assets.seerbitapi.com/images/seerbit_logo_type.png\"\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n\u003c!-- \u003ch1 align=\"center\"\u003e\n  \u003cimg width=\"60\" valign=\"bottom\" src=\"https://reactnative.dev/img/header_logo.svg\" alt=\"ReactJS\"\u003e\n   SeerBit\n\u003c/h1\u003e --\u003e\n\n### Seerbit Checkout Wrapper for ReactJS\n\n# Requirements\n\nThis module was built and tested using React 15.0.0 - 18.0.0\n\n## Get Started\n\nA simple way to add Seerbit to your React application\n\n\u003c!-- [![NPM](https://img.shields.io/npm/v/react-seerbit.svg)](https://www.npmjs.com/package/seerbit-reactjs) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) --\u003e\n\n## Install\n\n```bash\nnpm install --save seerbit-reactjs\n```\n\nOR\n\n```bash\nyarn add seerbit-reactjs\n```\n\n## Usage\n\nAdd Seerbit to your projects:\n\n1. As a React Hook\n2. As a React Button Component\n   \u003cbr/\u003e\n   \u003cbr/\u003e\n\n### As React Hook\n```jsx\n\nimport React, { Component } from \"react\";\nimport { useSeerbitPayment } from \"seerbit-reactjs\"\n\nconst App = () =\u003e {\n    const options = {\n    public_key: \"YOUR_PUBLIC_KEY\",\n    amount: 100,\n    tranref: new Date().getTime(),\n    currency: \"NGN\",\n    email: \"test@mail.com\",\n    full_name: \"Sam Smart\",\n    mobile_no: \"081234566789\",\n    description: \"test\",\n    tokenize: false,\n    planId: \"\",\n    pocketId: \"\",\n    vendorId: \"\",\n    customization: {\n      theme: {\n        border_color: \"#000000\",\n        background_color: \"#004C64\",\n        button_color: \"#0084A0\",\n      },\n      payment_method: [\"card\", \"account\", \"transfer\", \"wallet\", \"ussd\"],\n      display_fee: true, // true\n      display_type: \"embed\", //inline\n      logo: \"logo_url | base64\",\n    },\n  };\n\n  const close = (close) =\u003e {\n    console.log(close);\n  };\n\n  const callback = (response: any, closeCheckout: any) =\u003e {\n    console.log(response);\n\n    setTimeout(() =\u003e closeCheckout(), 2000);\n  };\n\n   const initializePayment = useSeerbitPayment(options, callback, close);\n\n\n  return (\n    \u003cdiv\u003e\n      \u003ch2\u003eMake Payment\u003c/h2\u003e\n      \u003cbutton onClick={initializePayment}\u003ePay\u003c/button\u003e\n    \u003c/div\u003e\n  );\n};\n\n\nexport default App\n```\n\n\n### As Button Component\n\n```jsx\nimport React, { Component } from \"react\";\nimport { SeerbitButton } from \"seerbit-reactjs\"\n\nconst App = () =\u003e {\n    const options = {\n    public_key: \"YOUR_PUBLIC_KEY\",\n    amount: 100,\n    tranref: new Date().getTime(),\n    currency: \"NGN\",\n    email: \"test@mail.com\",\n    full_name: \"Sam Smart\",\n    mobile_no: \"081234566789\",\n    description: \"test\",\n    tokenize: false,\n    planId: \"\",\n    pocketId: \"\",\n    vendorId: \"\",\n    customization: {\n      theme: {\n        border_color: \"#000000\",\n        background_color: \"#004C64\",\n        button_color: \"#0084A0\",\n      },\n      payment_method: [\"card\", \"account\", \"transfer\", \"wallet\", \"ussd\"],\n      display_fee: true, // true\n      display_type: \"embed\", //inline\n      logo: \"logo_url | base64\",\n    },\n  };\n\n  const close = (close) =\u003e {\n    console.log(close);\n  };\n  const callback = (response: any, closeCheckout: any) =\u003e {\n    console.log(response);\n\n    setTimeout(() =\u003e closeCheckout(), 2000);\n  };\n\n  const paymentProps = {\n    ...options,\n    callback,\n    close,\n  };\n\n  return (\n    \u003cdiv\u003e\n      \u003ch2\u003eMake Payment\u003c/h2\u003e\n      \u003cSeerbitButton text=\"test payment\" className=\"app-btn\" {...paymentProps} /\u003e\n    \u003c/div\u003e\n  );\n};\n\n\nexport default App\n```\n\nPlease checkout \u003ca href='https://doc.seerbit.com'\u003eSeerbit Documentation\u003c/a\u003e for other available options you can add to the tag\n\n## License\n\nMIT © [seerbit](https://github.com/seerbit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseerbit%2Fseerbit-reactjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseerbit%2Fseerbit-reactjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseerbit%2Fseerbit-reactjs/lists"}