2.0.7 • Published 2 years ago

nuxt-chargebee v2.0.7

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

nuxt-chargebee

Chargebee module for Nuxt.js that allows to checkout and open the self-service portal inside a Nuxt.js app.

Install

# npm
$ npm install nuxt-chargebee

# Yarn
$ yarn add nuxt-chargebee

Usage

Add the module to your Nuxt.js modules list in nuxt.config.js:

export default {
  ...
  modules: [
    ['nuxt-chargebee', { siteName: 'my-site' }],
  ],
}

Or use the top-level option:

export default {
  ...
  modules: [
    'nuxt-chargebee',
  ],
  chargebee: {
    siteName: 'my-site',
  },
}

Then you can checkout in your components or open the self-service portal:

export default {
  props: {
    ...
  },
  methods: {
    checkout() {
      this.$chargebee.checkout('my-plan-id')
    },
    portal() {
      this.$chargebee.portal()
    },
  },
}

User Sessions

It is possible to configure a session url. This url is used to create a session for checkout and the self-service portal:

export default {
  ...
  modules: [
    ['nuxt-chargebee', { siteName: 'my-site', sessionUrl: '/api/create-session' }],
  ],
}

More information on portal sessions can be found in the Chargebee API docs.

Contribute

Are you missing something or want to contribute? Feel free to file an issue or a pull request! ⚙️

Support

Hey, I am Sebastian Landwehr, a freelance web developer, and I love developing web apps and open source packages. If you want to support me so that I can keep packages up to date and build more helpful tools, you can donate here:

Thanks a lot for your support! ❤️

License

MIT License © Sebastian Landwehr

2.0.7

2 years ago

2.0.6

2 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago