{"id":40970171,"url":"https://github.com/thepeerstack/thepeer-react-native","last_synced_at":"2026-01-22T06:42:22.711Z","repository":{"id":43717317,"uuid":"370302734","full_name":"thepeerstack/thepeer-react-native","owner":"thepeerstack","description":"Thepeer Official React Native SDK","archived":false,"fork":false,"pushed_at":"2023-06-28T11:58:40.000Z","size":806,"stargazers_count":8,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-24T13:28:30.801Z","etag":null,"topics":["payment","react-native","sdk-react-native"],"latest_commit_sha":null,"homepage":"https://thepeer.co","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/thepeerstack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-24T09:47:52.000Z","updated_at":"2023-04-12T07:45:09.000Z","dependencies_parsed_at":"2025-08-24T13:28:35.004Z","dependency_job_id":"eab6d0e3-dcad-4f47-88d8-bc436256a3b1","html_url":"https://github.com/thepeerstack/thepeer-react-native","commit_stats":null,"previous_names":["thepeerstack/react-native-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thepeerstack/thepeer-react-native","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepeerstack%2Fthepeer-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepeerstack%2Fthepeer-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepeerstack%2Fthepeer-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepeerstack%2Fthepeer-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thepeerstack","download_url":"https://codeload.github.com/thepeerstack/thepeer-react-native/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepeerstack%2Fthepeer-react-native/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28657095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["payment","react-native","sdk-react-native"],"created_at":"2026-01-22T06:42:21.775Z","updated_at":"2026-01-22T06:42:22.700Z","avatar_url":"https://github.com/thepeerstack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thepeer React Native SDK\n\nThepeer is a quick and secure way to send money across any business. The SDK handles connecting other businesses to your app.\n\n\u003cimg src='https://github.com/thepeerstack/thepeer-react-native/assets/23347440/effe4e48-3841-44cb-a88b-43bc745f594b' alt='screenshot of Send SDK' width='250px' /\u003e\n\u003cimg src='https://github.com/thepeerstack/thepeer-react-native/assets/23347440/bb54e005-590b-43d7-bae5-7f51af4ac746' alt='screenshot of Direct Charge SDK' width='250px' /\u003e\n\n## Installation\n\n```sh\nnpm install thepeer-react-native\n```\n\nor\n\n```sh\nyarn add thepeer-react-native\n```\n\nYou need to install `react-native-webview` if you don't have it installed. It's a dependency for this package. Here's a \u003ca href='https://github.com/react-native-webview/react-native-webview' rel='noopener noreferrer' target='_blank'\u003elink\u003c/a\u003e to their docs.\n\n## Usage\n\n```js\nimport React from 'react';\nimport { View, Pressable, Text } from 'react-native';\nimport {\n  ThepeerSend,\n  ThepeerDirectCharge,\n  ThepeerCheckout,\n} from 'thepeer-react-native';\n// ...\n\nconst sendApp = () =\u003e {\n  const [openSendSDK, setOpenSendSDK] = useState(false);\n  const closeSendSDK = () =\u003e setOpenSendSDK(false);\n\n  return (\n    \u003cView\u003e\n      \u003cThepeerSend\n        {...{\n          publicKey: 'PUBLIC_KEY',\n          userReference: 'USER_REFERENCE',\n          amount: 'AMOUNT_IN_KOBO',\n          currency: 'NGN',\n          openSendSDK,\n          onSuccess: (response) =\u003e {\n            console.log('response', response);\n            closeSendSDK();\n          },\n          onError: (response) =\u003e {\n            console.log('response', response);\n            closeSendSDK();\n          },\n          onClose: closeSendSDK,\n        }}\n      /\u003e\n      \u003cPressable onPress={() =\u003e setOpenSendSDK(true)}\u003e\n        \u003cText\u003eSend\u003c/Text\u003e\n      \u003c/Pressable\u003e\n    \u003c/View\u003e\n  );\n};\n\nconst directChargeApp = () =\u003e {\n  const [openDirectChargeSDK, setOpenDirectChargeSDK] = useState(false);\n  const closeDirectChargeSDK = () =\u003e setOpenDirectChargeSDK(false);\n\n  return (\n    \u003cView\u003e\n      \u003cThepeerDirectCharge\n        {...{\n          publicKey: 'PUBLIC_KEY',\n          userReference: 'USER_REFERENCE',\n          amount: 'AMOUNT_IN_KOBO',\n          currency: 'NGN',\n          openDirectChargeSDK,\n          onSuccess: (response) =\u003e {\n            console.log('response', response);\n            closeDirectChargeSDK();\n          },\n          onError: (response) =\u003e {\n            console.log('response', response);\n            closeDirectChargeSDK();\n          },\n          onClose: closeDirectChargeSDK,\n        }}\n      /\u003e\n      \u003cPressable onPress={() =\u003e setOpenDirectChargeSDK(true)}\u003e\n        \u003cText\u003eDirect Charge\u003c/Text\u003e\n      \u003c/Pressable\u003e\n    \u003c/View\u003e\n  );\n};\n\nconst checkoutApp = () =\u003e {\n  const [openCheckoutSDK, setOpenCheckoutSDK] = useState(false);\n  const closeCheckoutSDK = () =\u003e setOpenCheckoutSDK(false);\n\n  return (\n    \u003cView\u003e\n      \u003cThepeerCheckout\n        {...{\n          publicKey: 'PUBLIC_KEY',\n          amount: 'AMOUNT_IN_KOBO',\n          currency: 'NGN',\n          openCheckoutSDK,\n          onSuccess: (response) =\u003e {\n            console.log('response', response);\n            closeCheckoutSDK();\n          },\n          onError: (response) =\u003e {\n            console.log('response', response);\n            closeCheckoutSDK();\n          },\n          onClose: closeCheckoutSDK,\n        }}\n      /\u003e\n      \u003cPressable onPress={() =\u003e setOpenCheckoutSDK(true)}\u003e\n        \u003cText\u003eCheckout\u003c/Text\u003e\n      \u003c/Pressable\u003e\n    \u003c/View\u003e\n  );\n};\n```\n\n## Configuration Options\n\n- [`publicKey`](#publicKey)\n- [`amount`](#amount)\n- [`currency`](#currency)\n- [`onSuccess`](#onSuccess)\n- [`onError`](#onError)\n- [`onClose`](#onClose)\n- [`meta`](#meta)\n\n## Configuration Options for Send and Direct charge\n\n- [`userReference`](#userReference)\n\n### \u003ca name=\"publicKey\"\u003e\u003c/a\u003e `publicKey`\n\n**string: Required**\nYour public key can be found on your \u003ca href='https://dashboard.thepeer.co/settings/api-keys-and-webhooks' rel='noopener noreferrer' target='_blank'\u003edashboard settings\u003c/a\u003e.\n\n### \u003ca name=\"userReference\"\u003e\u003c/a\u003e `userReference`\n\n**string: Required**\nThe user reference returned by Thepeer API when a user has been indexed\n\n### \u003ca name=\"amount\"\u003e\u003c/a\u003e `amount`\n\n**string|number: Required**\nThe amount you intend to send in kobo\n\n### \u003ca name=\"currency\"\u003e\u003c/a\u003e `currency`\n\n**string: Optional**\nThe currency being used. Defaults to **NGN**\n\n### \u003ca name=\"onSuccess\"\u003e\u003c/a\u003e `onSuccess`\n\n**(response) =\u003e void: Required**\nThis is called when a transaction is successfully. It returns a response with event type and transaction object.\n\n\nSee the \u003ca href='https://docs.thepeer.co/process-authorization-requests#supported-values' rel='noopener noreferrer' target='_blank'\u003eevent types\u003c/a\u003e.\n\nSee the \u003ca href='https://docs.thepeer.co/transaction/transaction-object' rel='noopener noreferrer' target='_blank'\u003etransaction object\u003c/a\u003e.\n\n### \u003ca name=\"onError\"\u003e\u003c/a\u003e `onError`\n\n**(response) =\u003e void: Required**\nThis is called when a transaction fails. It returns a response with event type\n\nSee the \u003ca href='https://docs.thepeer.co/process-authorization-requests#supported-values' rel='noopener noreferrer' target='_blank'\u003eevent types\u003c/a\u003e.\n\n### \u003ca name=\"onClose\"\u003e\u003c/a\u003e `onClose`\n\n**(response) =\u003e void: Required**\nThis is called when a user clicks on the close button.\n\n### \u003ca name=\"meta\"\u003e\u003c/a\u003e `meta`\n\n**object: Optional**\nThis object should contain additional/optional attributes you would like to have on your transaction response\n\n## Configuration Options for Send\n\n### \u003ca name=\"openSendSDK\"\u003e\u003c/a\u003e `openSendSDK`\n\n**boolean: Required**\n\nThis is a prop to display/hide the sdk\n\n## Configuration Options for Direct charge\n\n### \u003ca name=\"openDirectChargeSDK\"\u003e\u003c/a\u003e `openDirectChargeSDK`\n\n**boolean: Required**\nThis is a prop to display/hide the sdk\n\n## Configuration Options for Checkout\n\n### \u003ca name=\"openCheckoutSDK\"\u003e\u003c/a\u003e `openCheckoutSDK`\n\n**boolean: Required**\nThis is a prop to display/hide the sdk\n\n\n### \u003ca name=\"email\"\u003e\u003c/a\u003e `email`\n\n**string: Required**\nThe user's email address.\n\n## Common Issues\n#### Tried to register two views with the same name RNCWebview\n- The minimum version of the RN Webview package used for this project is `11.13.0`. Update your version to this version or later to fix this issue.\n- To know all the versions of react-native-webview within your project, run `npm ls react-native-webview`, and upgrade to the latest version.\n\n## Support\n\nIf you're having trouble with Thepeer React or your integration, please reach out to us at \u003csupport@thepeer.co\u003e. We're more than happy to help you out.\n\n## Thepeer's API References\n\n- \u003ca href='https://docs.thepeer.co' rel='noopener noreferrer' target='_blank'\u003eThepeer's API Docs\u003c/a\u003e\n- \u003ca href='https://dashboard.thepeer.co' rel='noopener noreferrer' target='_blank'\u003eThepeer's Dashboard\u003c/a\u003e\n\n\n## License\n\n[MIT](https://github.com/thepeerstack/thepeer-react-native/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepeerstack%2Fthepeer-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthepeerstack%2Fthepeer-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepeerstack%2Fthepeer-react-native/lists"}