{"id":51534048,"url":"https://github.com/bazileros/payfastt","last_synced_at":"2026-07-09T06:30:58.394Z","repository":{"id":365785808,"uuid":"1273740422","full_name":"bazileros/payfastt","owner":"bazileros","description":"Payfast Component","archived":false,"fork":false,"pushed_at":"2026-07-03T05:10:44.000Z","size":711,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-07-03T06:23:55.591Z","etag":null,"topics":["convex","convex-component","payfast","payment-integration","typescript"],"latest_commit_sha":null,"homepage":"https://pfdocs.surestrat.xyz","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bazileros.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-18T20:34:19.000Z","updated_at":"2026-07-03T05:10:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bazileros/payfastt","commit_stats":null,"previous_names":["bazileros/payfastt"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/bazileros/payfastt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazileros%2Fpayfastt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazileros%2Fpayfastt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazileros%2Fpayfastt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazileros%2Fpayfastt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bazileros","download_url":"https://codeload.github.com/bazileros/payfastt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazileros%2Fpayfastt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35290235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"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":["convex","convex-component","payfast","payment-integration","typescript"],"created_at":"2026-07-09T06:30:58.302Z","updated_at":"2026-07-09T06:30:58.385Z","avatar_url":"https://github.com/bazileros.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://img.shields.io/badge/payfastt-%23000000?style=for-the-badge\u0026logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMjAgM2wxNyAxMGwtMTcgMTAtMTctMTB6TTMgMjBsMTcgMTAgMTctMTB6Ii8+PC9zdmc+\"\u003e\n    \u003cimg alt=\"payfastt\" src=\"https://img.shields.io/badge/payfastt-%23000000?style=for-the-badge\u0026logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMjAgM2wxNyAxMGwtMTcgMTAtMTctMTB6TTMgMjBsMTcgMTAgMTctMTB6Ii8+PC9zdmc+\" width=\"200\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003epayfastt\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003ePayFast payments for Convex apps\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e ·\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e ·\n  \u003ca href=\"#docs\"\u003eDocs\u003c/a\u003e ·\n  \u003ca href=\"#project-structure\"\u003eStructure\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@bazileros/payfast\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@bazileros/payfast?style=flat-square\u0026logo=npm\u0026label=package\" alt=\"npm\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@bazileros/payfast\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/@bazileros/payfast?style=flat-square\" alt=\"license\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.typescriptlang.org\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/TypeScript-3178C6?style=flat-square\u0026logo=typescript\u0026logoColor=white\" alt=\"TypeScript\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://turbo.build/repo\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Turborepo-EF4444?style=flat-square\u0026logo=turborepo\u0026logoColor=white\" alt=\"Turborepo\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://convex.dev\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Convex-0D1821?style=flat-square\u0026logo=convex\u0026logoColor=white\" alt=\"Convex\"\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://bun.sh\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Bun-000?style=flat-square\u0026logo=bun\u0026logoColor=white\" alt=\"Bun\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://biomejs.dev\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Biome-60A5FA?style=flat-square\u0026logo=biome\u0026logoColor=white\" alt=\"Biome\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://payfastt.dev/docs\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-starlight-8B5CF6?style=flat-square\" alt=\"docs\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Features\n\n**@bazileros/payfast** is a [Convex](https://convex.dev) component that integrates the [PayFast](https://www.payfast.co.za) payment gateway into your Convex application. Drop it in with `app.use(payfast)` and start accepting payments.\n\n- **One-time payments** via PayFast Custom Integration (signed form redirect — PCI-compliant)\n- **Recurring billing** — create, pause, unpause, cancel, and update subscriptions\n- **Tokenized charges** — ad-hoc charges against existing subscription tokens\n- **Refunds** — full and partial via PayFast REST API\n- **Onsite payments** — hosted iframe widget via `POST /onsite/process`\n- **Transaction history** — query PayFast transaction records\n- **Stored credit cards** — query saved cards via REST API\n- **ITN webhook** — echo-back-validated + source IP checked + signature verified\n- **React hooks** — `usePayfastCheckout`, `useTransactions`, `useSubscriptions`, `useSubscriptionActions`, `usePayfastOnsite`, `useAdhocCharge`, `useRefund`\n- **Context provider** — `PayfastProvider` eliminates passing `components.payfast` to every hook\n- **Sandbox mode** — toggle via `PAYFAST_SANDBOX` env var\n- **Type-safe** — full TypeScript types for requests, responses, and webhook events\n\n## Quick Start\n\n```bash\nnpm install @bazileros/payfast\n```\n\n### 1. Register the component\n\n```ts\n// convex/convex.config.ts\nimport { defineApp } from \"convex/server\";\nimport payfast from \"@bazileros/payfast/convex.config\";\n\nconst app = defineApp();\napp.use(payfast);\nexport default app;\n```\n\n### 2. Set environment variables\n\n```bash\nnpx convex env set PAYFAST_MERCHANT_ID    your_merchant_id\nnpx convex env set PAYFAST_MERCHANT_KEY   your_merchant_key\nnpx convex env set PAYFAST_PASSPHRASE     your_passphrase\nnpx convex env set PAYFAST_SANDBOX        true\n```\n\n### 3. Mount the ITN webhook\n\n```ts\n// convex/http.ts\nimport { httpRouter } from \"convex/server\";\nimport { registerRoutes } from \"@bazileros/payfast/http\";\nimport { components } from \"./_generated/api\";\n\nconst http = httpRouter();\nregisterRoutes(http, components.payfast);\nexport default http;\n```\n\n### 4. Use it\n\n```tsx\nimport { PayfastProvider, usePayfastCheckout } from \"@bazileros/payfast/react\";\nimport { components } from \"../convex/_generated/api\";\n\nfunction Root() {\n  return (\n    \u003cPayfastProvider component={components.payfast}\u003e\n      \u003cDonateButton /\u003e\n    \u003c/PayfastProvider\u003e\n  );\n}\n\nfunction DonateButton() {\n  const { generateCheckout, loading } = usePayfastCheckout({\n    amount: 100,\n    itemName: \"Donation\",\n  });\n  return \u003cbutton onClick={generateCheckout} disabled={loading}\u003eDonate R100\u003c/button\u003e;\n}\n```\n\nSee the full [documentation →](https://payfastt.dev/docs)\n\n## Project Structure\n\n```\npayfastt/\n├── packages/\n│   ├── payfast/          # @bazileros/payfast — the Convex component\n│   │   ├── src/\n│   │   │   ├── client/   # Payfast class + registerRoutes helper\n│   │   │   ├── component/  # Queries, mutations, actions, schema, HTTP routes\n│   │   │   └── react/    # React hooks\n│   │   └── SKILL.md      # AI agent skill file (skills.sh compatible)\n│   ├── backend/          # Example Convex backend using the component\n│   ├── ui/               # Shared shadcn/ui primitives\n│   └── infra/            # Deployment (Cloudflare Workers via Alchemy)\n├── apps/\n│   ├── web/              # Example TanStack Router SPA\n│   └── docs/             # Documentation site (Astro Starlight)\n└── .github/\n    └── workflows/        # CI/CD: test, deploy, publish\n```\n\n## Scripts\n\n| Command | Description |\n|---------|-------------|\n| `bun run dev` | Start all apps in development mode |\n| `bun run build` | Build all packages and apps |\n| `bun run bootstrap` | First-time setup (codegen + build) |\n| `bun run check` | Biome lint + format check |\n| `bun run check-types` | TypeScript type check all packages |\n\n## Agent / AI Support\n\nA `SKILL.md` ships with the npm package for AI agent discoverability. Compatible with Claude Code, Cursor, opencode, Cline, Windsurf, and 30+ other agents via [skills.sh](https://skills.sh).\n\n## License\n\nApache 2.0 — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazileros%2Fpayfastt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbazileros%2Fpayfastt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazileros%2Fpayfastt/lists"}