{"id":18852556,"url":"https://github.com/discue/paddle-integration-mongodb","last_synced_at":"2026-03-06T16:34:49.493Z","repository":{"id":170356922,"uuid":"646236817","full_name":"discue/paddle-integration-mongodb","owner":"discue","description":"Paddle payments integration for mongodb database","archived":false,"fork":false,"pushed_at":"2026-02-21T06:36:58.000Z","size":4396,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-21T13:44:32.410Z","etag":null,"topics":["discue","mongodb","paddle","payments","saas"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/discue.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-27T18:17:00.000Z","updated_at":"2026-02-21T06:36:56.000Z","dependencies_parsed_at":"2025-12-02T16:01:19.805Z","dependency_job_id":null,"html_url":"https://github.com/discue/paddle-integration-mongodb","commit_stats":null,"previous_names":["discue/paddle-integration-mongodb"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/discue/paddle-integration-mongodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discue%2Fpaddle-integration-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discue%2Fpaddle-integration-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discue%2Fpaddle-integration-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discue%2Fpaddle-integration-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/discue","download_url":"https://codeload.github.com/discue/paddle-integration-mongodb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discue%2Fpaddle-integration-mongodb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30185560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T14:42:24.748Z","status":"ssl_error","status_checked_at":"2026-03-06T14:42:14.925Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["discue","mongodb","paddle","payments","saas"],"created_at":"2024-11-08T03:40:33.727Z","updated_at":"2026-03-06T16:34:44.482Z","avatar_url":"https://github.com/discue.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n\u003cp align=\"center\"\u003e\r\n\u003ca href=\"https://www.discue.io/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg width=\"128\" src=\"https://www.discue.io/icons-fire-no-badge-square/web/icon-192.png\" alt=\"Vue logo\"\u003e\r\n\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\u003cbr/\u003e\r\n\u003cdiv align=\"center\"\u003e\r\n\r\n[![GitHub tag](https://img.shields.io/github/tag/discue/paddle-integration-mongodb?include_prereleases=\u0026sort=semver\u0026color=blue)](https://github.com/discue/paddle-integration-mongodb/releases/)\r\n[![Latest Stable Version](https://img.shields.io/npm/v/@discue/paddle-integration-mongodb.svg)](https://www.npmjs.com/package/@discue/paddle-integration-mongodb)\r\n[![License](https://img.shields.io/npm/l/@discue/paddle-integration-mongodb.svg)](https://www.npmjs.com/package/@discue/paddle-integration-mongodb)\r\n\u003cbr/\u003e\r\n[![NPM Downloads](https://img.shields.io/npm/dt/@discue/paddle-integration-mongodb.svg)](https://www.npmjs.com/package/@discue/paddle-integration-mongodb)\r\n[![NPM Downloads](https://img.shields.io/npm/dm/@discue/paddle-integration-mongodb.svg)](https://www.npmjs.com/package/@discue/paddle-integration-mongodb)\r\n\u003cbr/\u003e\r\n[![contributions - welcome](https://img.shields.io/badge/contributions-welcome-blue)](/CONTRIBUTING.md \"Go to contributions doc\")\r\n[![Made with Node.js](https://img.shields.io/badge/Node.js-\u003e=12-blue?logo=node.js\u0026logoColor=white)](https://nodejs.org \"Go to Node.js homepage\")\r\n\r\n\u003c/div\u003e\r\n\r\n# paddle-integration-mongodb\r\n\r\n[paddle.com](https://www.paddle.com/) payments integration for [MongoDB](https://www.mongodb.com/).\r\n\r\nThis module provides \r\n- a body parser function\r\n- a middleware function to receive and store [Paddle Webhooks](https://developer.paddle.com/getting-started/ef9af9f700849-working-with-paddle-webhooks)\r\n- access to the Paddle API.\r\n\r\nIt does **not** \r\n- validate webhook content. Use and register [paddle-webhook-validator](https://github.com/discue/paddle-webhook-validator) in your application to validate webhooks before storing them.\r\n\r\n## Installation\r\n```bash\r\nnpm install @discue/paddle-integration-mongodb\r\n```\r\n\r\n## Components\r\n- \u003ca href=\"README_HOOK_BODY_PARSER.md\"\u003eWebhooks Body Parser\u003c/a\u003e\r\n- \u003ca href=\"README_HOOK_MIDDLEWARE.md\"\u003eWebhooks Middleware\u003c/a\u003e\r\n- \u003ca href=\"README_SUBSCRIPTION_INFO.md\"\u003eSubscription Info\u003c/a\u003e\r\n- \u003ca href=\"README_SUBSCRIPTION_HYDRATION.md\"\u003eSubscription Hydration\u003c/a\u003e\r\n- \u003ca href=\"README_SUBSCRIPTION_API.md\"\u003eSubscriptions API\u003c/a\u003e\r\n\r\n### Preparing a New Subscription\r\nFor the webhooks integration to work and to be able to correlate incoming hooks with the correct subscription, a placeholder needs to be created **before the checkout** and - afterward - a specific value must be passed to the [Checkout API](https://developer.paddle.com/guides/ZG9jOjI1MzU0MDQz-pass-parameters-to-the-checkout) via the `passthrough` parameter. This value will be returned by the `addSubscriptionPlaceholder` method.\r\n\r\n```js\r\nimport { SubscriptionHooks, subscriptionStorage } from '@discue/paddle-integration-mongodb'\r\nimport client from './my-mongodb-client.js' // \u003c-- to be provided by your application\r\n\r\nconst storage = subscriptionStorage({ client })\r\nconst subscriptions = new SubscriptionHooks({ storage })\r\n\r\nmodule.exports = async (req, res, next) =\u003e {\r\n    // requires application to read api_client information \r\n    // based on incoming information like a JWT or a cookie\r\n    const { id } = readApiClient(req)\r\n\r\n    // create subscription placeholder\r\n    const { passthrough } = await subscriptions.addSubscriptionPlaceholder([id])\r\n    // return the passthrough to the frontend app\r\n    res.status(200).send(JSON.stringify({ passthrough }))\r\n}\r\n```\r\n\r\n## Run E2E Tests\r\n\r\nTo run tests, run the following command\r\n\r\n```bash\r\n./test-e2e.sh\r\n```\r\n\r\n## License\r\n\r\n[MIT](https://choosealicense.com/licenses/mit/)\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscue%2Fpaddle-integration-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscue%2Fpaddle-integration-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscue%2Fpaddle-integration-mongodb/lists"}