{"id":20051753,"url":"https://github.com/seerbit/seerbit-react-native","last_synced_at":"2025-05-05T11:31:59.855Z","repository":{"id":37901234,"uuid":"315325874","full_name":"seerbit/seerbit-react-native","owner":"seerbit","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-17T13:30:14.000Z","size":111005,"stargazers_count":1,"open_issues_count":9,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-08T22:23:06.660Z","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":"mit","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}},"created_at":"2020-11-23T13:34:57.000Z","updated_at":"2025-04-01T22:06:41.000Z","dependencies_parsed_at":"2023-01-25T15:30:44.295Z","dependency_job_id":null,"html_url":"https://github.com/seerbit/seerbit-react-native","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seerbit","download_url":"https://codeload.github.com/seerbit/seerbit-react-native/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252489085,"owners_count":21756262,"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:43.684Z","updated_at":"2025-05-05T11:31:54.844Z","avatar_url":"https://github.com/seerbit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg width=\"400\" valign=\"top\" src=\"https://assets.seerbitapi.com/images/seerbit_logo_type.png\" data-canonical-src=\"https://res.cloudinary.com/dpejkbof5/image/upload/v1620323718/Seerbit_logo_png_ddcor4.png\" style=\"max-width:100%; \"\u003e\n\u003c/p\u003e\n\n\n# Seerbit React Native WebView SDK\n\nSeerit React Native SDK can be used to integrate the SeerBit payment gateway into your react native application. \n\n## Requirements \nRegister for a merchant account on [Seerbit Merchant Dashboard](https://dashboard.seerbitapi.com) to get started. \n\n## Installation\n```bash\nnpm install seerbit-react-native\nnpm install react-native\nnpm install react-native-webview\n```\n```bash\nyarn add seerbit-react-native\nyarn add react-native\nyarn add react-native-webview\n```\n## API Documentation \n   https://doc.seerbit.com\n\n## Support \nIf you have any problems, questions or suggestions, create an issue here or send your inquiry to developers@seerbit.com\n\n## Usage\nYou should already have your API keys, If not, go to Accounts -\u003e Settings Section -\u003e API Keys section on [dashboard.seerbitapi.com](https://dashboard.seerbitapi.com).\n\n```js\nimport React, { useRef, useState } from 'react';\nimport Seerbit, { ISeerbit } from 'seerbit-react-native'\n\nimport { View } from 'react-native';\n\nexport default function App() {\n  const [amount, setAmount] = useState\u003cstring\u003e('20');\n\n  const seerBitCheckoutRef = useRef\u003cISeerbit\u003e(null);\n\n  const startPay = () =\u003e {\n    seerBitCheckoutRef.current?.startPayment();\n  }\n\n  const paymentSuccessful = (resp: any) =\u003e {\n    //RETURNS A RESPONSE OBJECT\n    // {\n    // code: '00',\n    // message: 'APPROVED',\n    // payments: {},\n    // reference: {},\n    // }\n\n\n    //HERE YOU CAN MANAGE CLOSING AND RESTARTING A PAYMENT USING THE seerBitCheckout REFERENCE\n    //seerBitCheckoutRef.current?.endPayment()\n    //seerBitCheckoutRef.current?.startPayment()\n\n    // THIS CLOSES THE CHECKOUT IMMEDIATELY A PAYMENT IS SUCCESSFUL\n    seerBitCheckoutRef.current?.endPayment();\n\n    // YOU CAN ALSO DELAY AND DO SOME OTHER LOGIC BEFORE CLOSING THE CHECKOUT\n    // setTimeout(() =\u003e {\n    //   seerBitCheckoutRef.current?.endPayment();\n    // }, 2000);\n  };\n\n  return (\n    \u003cView style={{ flex: 1 }}\u003e\n      \u003cView style={{ justifyContent: 'center', alignItems: 'center' }}\u003e\n        \u003cSeerbit\n          buttonText=\"Pay with SeerBit\" //OPTIONAL\n          showButton={true} //OPTIONAL DEFAULTS TO TRUE\n          autoLoad={false} //OPTIONAL DEFAULTS TO TRUE\n          amount={amount} //REQUIRED\n          ActivityIndicatorColor=\"blue\" //OPTIONAL\n          btnStyles={{\n            alignItems: 'center',\n            backgroundColor: \"#000\",\n            padding: 15,\n            marginTop: 100,\n            marginLeft: 30,\n            marginRight: 30,\n            borderRadius: 10\n          }} //OPTIONAL\n          textStyles={{\n            color: \"#fff\",\n          }} //OPTIONAL\n          ref={seerBitCheckoutRef} //REQUIRED\n          transaction_reference={new Date().getTime().toString()} //REQUIRED\n          currency=\"NGN\" //OPTIONAL FOR NIGERIA\n          pocket_reference=\"\" //OPTIONAL\n          vendor_id=\"\" //OPTIONAL\n          description=\"PAYMENT WITH SEERBIT\" //OPTIONAL\n          full_name=\"John Bello\"\n          email=\"bellokola@mail.com\"\n          close_prompt={false} //Disable the prompt when the cancel button is closed\n          close_on_success={false} //Immediately close the checkout after a successful transaction\n          country=\"NG\" //OPTIONAL\n          public_key=\"SBTESTPUBK_4oCO2Xxp8wOtHxmyuqPZMIjbt4CRTKn0\" //REQUIRED\n          tokenize={false} //OPTIONAL\n          onSuccess={(response: any) =\u003e { \n            paymentSuccessful(response)\n          }}\n          onCancel={() =\u003e {} }\n          recurrent={false} // Recurrent Payment\n          planId=\"\" // Subscription Plan ID\n          productId=\"\" //Product ID\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            confetti: true, // default true;\n          }} \n          callbackurl={'https://google.com'} \n          setAmountByCustomer={false}\n          onError={() =\u003e { console.log('onError=++++=') }}\n        /\u003e\n      \u003c/View\u003e\n    \u003c/View\u003e\n  )\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseerbit%2Fseerbit-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseerbit%2Fseerbit-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseerbit%2Fseerbit-react-native/lists"}