{"id":40970181,"url":"https://github.com/thepeerstack/thepeer-react","last_synced_at":"2026-01-22T06:42:23.260Z","repository":{"id":44886251,"uuid":"447601563","full_name":"thepeerstack/thepeer-react","owner":"thepeerstack","description":"Thepeer's react library","archived":false,"fork":false,"pushed_at":"2023-05-24T21:51:31.000Z","size":587,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-01T23:44:36.672Z","etag":null,"topics":["payment","react","sdk-react"],"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":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":"2022-01-13T13:03:26.000Z","updated_at":"2023-08-21T01:06:35.000Z","dependencies_parsed_at":"2023-02-13T21:05:23.950Z","dependency_job_id":null,"html_url":"https://github.com/thepeerstack/thepeer-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thepeerstack/thepeer-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepeerstack%2Fthepeer-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepeerstack%2Fthepeer-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepeerstack%2Fthepeer-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepeerstack%2Fthepeer-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thepeerstack","download_url":"https://codeload.github.com/thepeerstack/thepeer-react/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepeerstack%2Fthepeer-react/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","sdk-react"],"created_at":"2026-01-22T06:42:22.368Z","updated_at":"2026-01-22T06:42:23.256Z","avatar_url":"https://github.com/thepeerstack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# thepeer-react\n\n\u003e Official React package for Thepeer\n\n# Thepeer React package\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 width=\"510\" alt=\"Send SDK\" src=\"https://user-images.githubusercontent.com/23347440/128957185-e12ae9cb-8a11-4188-bd52-4412a9ff4215.png\"\u003e\n\u003cimg width=\"510\" alt=\"Direct charge SDK\" src=\"https://user-images.githubusercontent.com/23347440/128957237-6b83b2d9-4a36-44b2-b147-e4e556eb1d11.png\"\u003e\n\u003cimg width=\"510\" alt=\"Checkout SDK\" src=\"https://user-images.githubusercontent.com/23347440/149753259-01f927a2-22ac-4f07-9224-6c1b5694ecf1.png\"\u003e\n\n## Installation\n\n```sh\nnpm install thepeer-react\n```\n\n## Usage\n\n```js\nimport React from 'react'\nimport { useSend, useDirectCharge, useCheckout } from 'thepeer-react'\n// ...\n\nexport default function App() {\n  const config = {\n    publicKey: 'PUBLIC_KEY',\n    amount: 'AMOUNT_IN_KOBO',\n    currency: 'NGN',\n    meta: {\n      discount: 'black friday'\n    }\n  }\n\n  const handleSendPayment = useSend({\n    ...config,\n    userReference: 'USER_REFERENCE'\n  })\n  const handleDirectChargePayment = useDirectCharge({\n    ...config,\n    userReference: 'USER_REFERENCE'\n  })\n  const handleCheckoutPayment = useCheckout(config)\n  return (\n    \u003cdiv className='App'\u003e\n      \u003ch1\u003eThepeer SDKs \u003c/h1\u003e\n      \u003cbutton onClick={handleSendPayment}\u003eSend\u003c/button\u003e\n      \u003cbutton onClick={handleDirectChargePayment}\u003eDirect Charge\u003c/button\u003e\n      \u003cbutton onClick={handleCheckoutPayment}\u003eCheckout\u003c/button\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n## Configuration Options\n\n- [`publicKey`](#publicKey)\n- [`userReference`](#userReference)\n- [`amount`](#amount)\n- [`currency`](#currency)\n- [`onSuccess`](#onSuccess)\n- [`onError`](#onError)\n- [`onClose`](#onClose)\n- [`meta`](#meta)\n\n### \u003ca name=\"publicKey\"\u003e\u003c/a\u003e `publicKey`\n\n**string: Required**\nYour public key can be found on your [dashboard](https://dashboard.thepeer.co) settings.\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 details.\n\nSee the [event details](#thepeerEvent) below.\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 [event details](#thepeerEvent) below.\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## 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 API References\n\n- [Thepeer API Docs](https://docs.thepeer.co)\n- [Thepeer Dashboard](https://dashboard.thepeer.co)\n\n## License\n\n[MIT](https://github.com/thepeerstack/thepeer-react/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepeerstack%2Fthepeer-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthepeerstack%2Fthepeer-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepeerstack%2Fthepeer-react/lists"}