{"id":28864881,"url":"https://github.com/theafolayan/react-native-kora-webview","last_synced_at":"2026-05-04T21:33:33.241Z","repository":{"id":299495327,"uuid":"1003224846","full_name":"theafolayan/react-native-kora-webview","owner":"theafolayan","description":"Kora WebView payment SDK for react native ","archived":false,"fork":false,"pushed_at":"2025-06-16T21:01:10.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-16T21:34:53.687Z","etag":null,"topics":["expo","kora","react-native","sdk","webview"],"latest_commit_sha":null,"homepage":"https://github.com/theafolayan/react-native-kora-webview","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/theafolayan.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-16T20:22:05.000Z","updated_at":"2025-06-16T21:02:05.000Z","dependencies_parsed_at":"2025-06-16T21:35:38.142Z","dependency_job_id":"d75b7c0e-9ba6-4ef7-87d7-b7a236d497b5","html_url":"https://github.com/theafolayan/react-native-kora-webview","commit_stats":null,"previous_names":["theafolayan/react-native-kora-webview"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theafolayan/react-native-kora-webview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theafolayan%2Freact-native-kora-webview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theafolayan%2Freact-native-kora-webview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theafolayan%2Freact-native-kora-webview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theafolayan%2Freact-native-kora-webview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theafolayan","download_url":"https://codeload.github.com/theafolayan/react-native-kora-webview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theafolayan%2Freact-native-kora-webview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32626133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"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":["expo","kora","react-native","sdk","webview"],"created_at":"2025-06-20T10:00:37.303Z","updated_at":"2026-05-04T21:33:33.236Z","avatar_url":"https://github.com/theafolayan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-korapay-webview\n\nA fully typed, WebView-based React Native SDK to accept payments via [KoraPay](https://korapay.com).\n\nInspired by the simplicity of `react-native-paystack-webview`, this package adds modal support, auto-dismiss, custom loader, and flexible configuration out of the box.\n\n---\n\n## Features\n\n- ✅ Modal-based WebView for KoraPay payments\n- ✅ TypeScript-first design\n- ✅ Auto-dismiss on payment success or cancellation\n- ✅ `onSuccess`, `onCancel`, and `onClose` lifecycle hooks\n- ✅ Optional `customLoader` support\n- ✅ Accepts metadata and custom payment URLs\n\n---\n\n## Installation\n\n```bash\nnpm install react-native-korapay-webview\n# or\nyarn add react-native-korapay-webview\n```\nAlso install react-native-webview if not already installed:\n\n```bash\nnpm install react-native-webview\n```\n\n## Basic Usage \n```javascript\nimport React, { useState } from 'react';\nimport { Button, SafeAreaView, Text, View } from 'react-native';\nimport { KoraPayWebView } from 'react-native-korapay-webview';\n\nexport default function App() {\n  const [visible, setVisible] = useState(false);\n\n  return (\n    \u003cSafeAreaView style={{ flex: 1 }}\u003e\n      \u003cButton title=\"Pay Now\" onPress={() =\u003e setVisible(true)} /\u003e\n\n      \u003cKoraPayWebView\n        visible={visible}\n        publicKey=\"pk_test_xxxx\"\n        email=\"user@example.com\"\n        amount={5000} // in kobo\n        currency=\"NGN\"\n        reference={`txn_${Date.now()}`}\n        metadata={{ userId: 42 }}\n        onSuccess={(res) =\u003e {\n          console.log('Payment Success:', res);\n          setVisible(false);\n        }}\n        onCancel={() =\u003e {\n          console.log('Payment Cancelled');\n          setVisible(false);\n        }}\n        onClose={() =\u003e {\n          console.log('WebView Closed');\n          setVisible(false);\n        }}\n        customLoader={\n          \u003cView style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}\u003e\n            \u003cText\u003eLoading Payment Page...\u003c/Text\u003e\n          \u003c/View\u003e\n        }\n      /\u003e\n    \u003c/SafeAreaView\u003e\n  );\n}\n```\n\n## Props Reference\n\n| Prop           | Type                       | Required | Description                                    |\n| :------------- | :------------------------- | :------- | :--------------------------------------------- |\n| `publicK`      | `string`                   | ✅       | Your KoraPay public key                        |\n| `email`        | `string`                   | ✅       | Customer's email                               |\n| `amount`       | `number`                   | ✅       | Amount in kobo / lowest denomination           |\n| `reference`    | `string`                   | ✅       | Unique transaction reference                   |\n| `currency`     | `string`                   | ❌       | Defaults to \"NGN\"                              |\n| `metadata`     | `Record\u003cstring, any\u003e`      | ❌       | Additional metadata to include                 |\n| `customPaymentUrl` | `string`               | ❌       | Optional custom KoraPay payment URL            |\n| `visible`      | `boolean`                  | ✅       | Controls whether modal is shown                |\n| `onSuccess`    | `(response: object) =\u003e void` | ❌       | Called on successful payment                   |\n| `onCancel`     | `() =\u003e void`               | ❌       | Called when user cancels payment               |\n| `onClose`      | `() =\u003e void`               | ❌       | Always called when modal closes                |\n| `customLoader` | `React.ReactNode`          | ❌       | Custom loading UI while WebView loads          |\n\n\n## Use With Custom KoraPay Links\nIf you already generate hosted payment links from your backend:\n\n```tsx\n\u003cKoraPayWebView\n  visible={true}\n  customPaymentUrl=\"https://korapay.com/pay/abc123\"\n  onClose={() =\u003e setVisible(false)}\n/\u003e\n```\n\n## Security Consideration\nAvoid generating sensitive values like references or metadata in the frontend. Always handle secure logic server-side.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheafolayan%2Freact-native-kora-webview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheafolayan%2Freact-native-kora-webview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheafolayan%2Freact-native-kora-webview/lists"}