{"id":34666885,"url":"https://github.com/bakissation/fastify-satim","last_synced_at":"2026-05-23T03:15:09.851Z","repository":{"id":330323222,"uuid":"1122413568","full_name":"bakissation/fastify-satim","owner":"bakissation","description":"Fastify plugin for SATIM (SATIM-IPAY) payments — typed decorator, multi-tenant, built-in routes. CIB \u0026 Edahabia.","archived":false,"fork":false,"pushed_at":"2026-05-22T19:20:17.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2026-05-22T21:59:54.386Z","etag":null,"topics":["algeria","cib","edahabia","fastify","fastify-plugin","fintech","multi-tenant","npm-package","payment-gateway","payments","satim","satim-ipay","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@bakissation/fastify-satim","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/bakissation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2025-12-24T17:11:18.000Z","updated_at":"2026-05-22T19:20:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bakissation/fastify-satim","commit_stats":null,"previous_names":["bakissation/fastify-satim"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/bakissation/fastify-satim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakissation%2Ffastify-satim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakissation%2Ffastify-satim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakissation%2Ffastify-satim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakissation%2Ffastify-satim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bakissation","download_url":"https://codeload.github.com/bakissation/fastify-satim/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakissation%2Ffastify-satim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33380930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T01:21:08.577Z","status":"online","status_checked_at":"2026-05-23T02:00:05.530Z","response_time":53,"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":["algeria","cib","edahabia","fastify","fastify-plugin","fintech","multi-tenant","npm-package","payment-gateway","payments","satim","satim-ipay","typescript"],"created_at":"2025-12-24T19:14:33.526Z","updated_at":"2026-05-23T03:15:09.845Z","avatar_url":"https://github.com/bakissation.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @bakissation/fastify-satim\n\nA **Fastify plugin** for the [SATIM (SATIM-IPAY)](https://github.com/bakissation/satim-ts) payment gateway — drop SATIM **CIB \u0026 Edahabia** payments into any Fastify app with a typed `fastify.satim` decorator, optional built-in routes, schema validation, and multi-tenant support. Works with **Fastify v4 and v5**.\n\n[![npm](https://img.shields.io/npm/v/@bakissation/fastify-satim?label=npm\u0026color=cb3837)](https://www.npmjs.com/package/@bakissation/fastify-satim)\n[![CI](https://github.com/bakissation/fastify-satim/actions/workflows/ci.yml/badge.svg)](https://github.com/bakissation/fastify-satim/actions/workflows/ci.yml)\n[![license](https://img.shields.io/npm/l/@bakissation/fastify-satim?color=blue)](./LICENSE)\n\n- 🧩 **Typed decorator** — `fastify.satim` exposes the full SATIM client (`register`, `getOrderStatus`, `confirm`, `refund`) across all scopes.\n- 🏢 **Multi-tenant** — resolve credentials per request via `getClient(request)`, or stay single-tenant with env vars / a config object / a pre-built client.\n- 🛣️ **Built-in routes (opt-in)** — `/register`, `/status`, `/confirm`, `/refund` with JSON-schema validation and per-route hooks — or wire your own.\n- 🔒 **Secure by default** — centralized error mapping that never leaks credentials, POST-only by default, no secret logging.\n\n\u003e 📖 **[Read the case study →](https://berkati.xyz/case-studies/fastify-satim-plugin/)** — how this plugin cuts SATIM integration from hundreds of lines of boilerplate per project to a single `register()` call.\n\n## Install\n\n```bash\nnpm install @bakissation/fastify-satim\n```\n\nRequires **Node.js ≥ 18** and **Fastify v4 or v5**. The core SDK [`@bakissation/satim`](https://github.com/bakissation/satim-ts) is included.\n\n## Quick start\n\n```typescript\nimport Fastify from 'fastify';\nimport fastifySatim, { interpretOrderStatus } from '@bakissation/fastify-satim';\n\nconst fastify = Fastify();\nawait fastify.register(fastifySatim, { fromEnv: true });\n\nfastify.post('/checkout', async (request, reply) =\u003e {\n  const order = await fastify.satim.register({\n    orderNumber: 'ORD001',\n    amount: 5000,                 // 5000 DZD\n    returnUrl: 'https://yoursite.com/payment/success',\n    udf1: 'INV001',\n  });\n  if (order.isSuccessful()) return { redirectUrl: order.formUrl };\n  return reply.status(400).send({ error: 'Failed to create order' });\n});\n\nfastify.post('/payment/callback', async (request) =\u003e {\n  const { orderId } = request.body as { orderId: string };\n  const status = await fastify.satim.getOrderStatus(orderId);\n  return status.isPaid() ? { status: 'paid' } : { status: interpretOrderStatus(status.orderStatus) };\n});\n\nawait fastify.listen({ port: 3000 });\n```\n\nThere are four ways to configure the client (multi-tenant, env, object, pre-built) → **[docs/configuration](./docs/configuration.md)**.\n\n## Documentation\n\nFull docs live in **[`docs/`](./docs/)**:\n\n| | |\n|---|---|\n| [Overview \u0026 concepts](./docs/overview.md) | What the plugin is, when to use it vs the raw SDK, design notes |\n| [Getting started](./docs/getting-started.md) | Install, register, first payment, environments |\n| [Configuration](./docs/configuration.md) | The four config modes (multi-tenant, env, object, client) |\n| [Built-in routes](./docs/routes.md) | `/register` · `/status` · `/confirm` · `/refund` — paths, hooks, bodies |\n| [Security](./docs/security.md) | Auth, CSRF, error mapping, best practices |\n| [Architecture](./docs/architecture.md) | Module map, plugin lifecycle, routes, error handling |\n\nFor the SATIM gateway API, environments, and certification, see the [core SDK docs](https://github.com/bakissation/satim-ts/tree/main/docs).\n\n## Contributing\n\nIssues and PRs welcome — read [CONTRIBUTING.md](./CONTRIBUTING.md) and the [Code of Conduct](./CODE_OF_CONDUCT.md). Releases are automated from [Conventional Commits](https://www.conventionalcommits.org/) via semantic-release; **don't bump the version or edit the changelog by hand**.\n\n## Credits\n\nBuilt and maintained by **Abdelbaki Berkati** — [berkati.xyz](https://berkati.xyz) · [@bakissation](https://github.com/bakissation).\n📖 [Read the case study →](https://berkati.xyz/case-studies/fastify-satim-plugin/)\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakissation%2Ffastify-satim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbakissation%2Ffastify-satim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakissation%2Ffastify-satim/lists"}