{"id":14971180,"url":"https://github.com/dogchef-be/nuxt-stripejs","last_synced_at":"2025-10-26T14:31:08.590Z","repository":{"id":54572069,"uuid":"289889865","full_name":"dogchef-be/nuxt-stripejs","owner":"dogchef-be","description":"💳 NuxtJS module for Stripe.js which loads only when required, multi-account support and w/ retry mechanism","archived":false,"fork":false,"pushed_at":"2023-07-03T14:12:46.000Z","size":521,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-30T05:07:36.221Z","etag":null,"topics":["nuxt","nuxt-module","nuxtjs","nuxtjs-ts","nuxtjs-typescript","stripe","stripe-api","stripe-elements","stripejs","typescript-support"],"latest_commit_sha":null,"homepage":"","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/dogchef-be.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}},"created_at":"2020-08-24T09:51:59.000Z","updated_at":"2023-05-03T09:10:43.000Z","dependencies_parsed_at":"2022-08-13T20:10:20.209Z","dependency_job_id":"bef38879-afed-4df8-bee0-83a6b845cd86","html_url":"https://github.com/dogchef-be/nuxt-stripejs","commit_stats":{"total_commits":45,"total_committers":6,"mean_commits":7.5,"dds":0.1333333333333333,"last_synced_commit":"69c67ce57019eba169a794fa846f432662314b58"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogchef-be%2Fnuxt-stripejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogchef-be%2Fnuxt-stripejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogchef-be%2Fnuxt-stripejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogchef-be%2Fnuxt-stripejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dogchef-be","download_url":"https://codeload.github.com/dogchef-be/nuxt-stripejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238347615,"owners_count":19456967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["nuxt","nuxt-module","nuxtjs","nuxtjs-ts","nuxtjs-typescript","stripe","stripe-api","stripe-elements","stripejs","typescript-support"],"created_at":"2024-09-24T13:44:49.275Z","updated_at":"2025-10-26T14:31:08.222Z","avatar_url":"https://github.com/dogchef-be.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  nuxt-stripejs\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  NuxtJS module for Stripe.js with multi-account support\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/nuxt-stripejs\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/nuxt-stripejs?style=flat-square\"\u003e\u003c/a\u003e \u003ca href=\"https://www.npmjs.com/package/nuxt-stripejs\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/nuxt-stripejs?style=flat-square\"\u003e\u003c/a\u003e \u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/github/license/dogchef-be/nuxt-stripejs?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Table of contents\n- [Main features](#main-features)\n- [Setup](#setup)\n- [Options](#options)\n- [Usage](#usage)\n- [License](#license)\n\n## Main features\n\n- Support multiple Stripe accounts\n- Load Stripe.js only when required (once `$stripe()` is called)\n- Reuse the same instance across all components\n- Retry mechanism to bypass temporary network issues\n- Public runtime config\n- TypeScript support\n\n## Setup\n\n1. Add `nuxt-stripejs` dependency to your project:\n\n```bash\nnpm install nuxt-stripejs\n```\n\n2. Add `nuxt-stripejs` module and configuration to `nuxt.config.js`:\n\n```js\nexport default {\n  // append the module\n  modules: [\"nuxt-stripejs\"];\n  \n  // public runtime config\n  publicRuntimeConfig: {\n    stripe: {\n      i18n: true,\n      accounts: [\n        {\n          id: 'account-a',\n          pubKey: 'pk_test_123',\n        },\n        {\n          id: 'account-b',\n          pubKey: 'pk_test_12345',\n        },\n      ],\n    },\n  }\n}\n```\n\n3. (Optional) TypeScript support. Add `nuxt-stripejs` to the `types` section of `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"types\": [\"nuxt-stripejs\"]\n  }\n}\n```\n\n## Options\n\n### `accounts`\n\n- Type: `NuxtStripeJsConfig`\n```ts\ninterface NuxtStripeJsAccount {\n    id: string\n    pubKey: string\n}\n\ninterface NuxtStripeJsConfig {\n    i18n: boolean;\n    accounts: NuxtStripeJsAccount[]\n}\n```\n\nStripe accounts (see an example in setup)\n\n### `i18n`\n\n- Type: `Boolean`\n- Default: `false`\n\nEnable [i18n-module](https://github.com/nuxt-community/i18n-module) integration.\n\n## Usage\n\nIt can be used inside components like:\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cdiv ref=\"stripeElements\" /\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\n```js\n{\n  async mounted() {\n    const stripe = await this.$stripe()\n    const elements = stripe.elements()\n\n    const card = elements.create('card')\n    card.mount(this.$refs.stripeElements)\n  }\n}\n```\n\nMultiple stripe accounts support:\n\n```js\n{\n  async mounted() {\n    const stripe = await this.$stripe(conditionX ? 'account-a' : 'account-b')\n    const elements = stripe.elements()\n\n    const card = elements.create('card')\n    card.mount(this.$refs.stripeElements)\n  }\n}\n```\n\n\nStripe: [JavaScript SDK documentation \u0026 reference](https://stripe.com/docs/js)\n\n## License\n\nSee the LICENSE file for license rights and limitations (MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdogchef-be%2Fnuxt-stripejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdogchef-be%2Fnuxt-stripejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdogchef-be%2Fnuxt-stripejs/lists"}