The user who is going to be subscribed to the package
If neither the user nor package exist yet in Kana, then you should create these first:Create UsersCreate new packagesOnce these are created, you will need to ensure you know the id of both.
Both the id for a User and a Package are defined by you upon creation in Kana.You can find the identifiers for both in the Dashboard, or by using the package and user queries to pull all respective records and grab the id from the one(s) you need
import { KanaAdmin } from '@usekana/admin-kana-js';const client = new KanaAdmin({ apiKey: API_KEY // Replace with own Private API Key});app.post('/subscribe', function(req, res){ const userId = req.body.user.id; // Assumes user object has been sent in request body to this endpoint const packageIds = req.body.packageIds // Assumes array of packageIds has been sent in request body to this endpoint const { data, error } = await client.subscriptions.create({packageIds: packageIds, userId: userId}); if error { res.status(400).send("We experienced an error when attempting to susbcribe you. Try again or contact support.") } else { // Send back JSON response of full susbscription object res.json(data); }});
Congratulations 🎉 You’ve now successfully redirected a user to subscribe
to Kana packages through Stripe.
Upon successful payment, this user will be subscribed to the package(s) and will have access to the features within. You can now implement checks to confirm they should have access to these features (either in your frontend and/or backend) and record usage of these features - which is even more necessary when they are consumable features whereby a customer is provisioned a certain amount.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Kana","colors":{"primary":"#5D5FEF","light":"#ACADEB","dark":"#1A202C"},"favicon":"/favicon.png","logo":{"light":"https://mintcdn.com/usekana/Z2Fsz-a5lBmMYI5l/logo/light.svg?fit=max\u0026auto=format\u0026n=Z2Fsz-a5lBmMYI5l\u0026q=85\u0026s=5005e3a5b1de5d8de9c98739e45bf2b8","dark":"https://mintcdn.com/usekana/Z2Fsz-a5lBmMYI5l/logo/dark.svg?fit=max\u0026auto=format\u0026n=Z2Fsz-a5lBmMYI5l\u0026q=85\u0026s=4bd492577a54a780e2237a999b4f022a"},"navbar":{"links":[{"label":"Blog","href":"https://www.usekana.com/blog"}],"primary":{"type":"button","label":"Sign in","href":"https://dashboard.usekana.com/auth/login"}},"integrations":{"intercom":{"appId":"iotthysq"}},"navigation":{"global":{"anchors":[{"anchor":"Pricing Index","href":"https://pricing-index.usekana.com/","icon":"tags"},{"anchor":"GraphiQL IDE","href":"https://api.usekana.com/graphql","icon":"chart-network","color":{"light":"#E535AB","dark":"#E535AB"}}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"usekana","hasAudioNarration":false,"actualSubdomain":"usekana","customDomains":["docs.usekana.com"],"gitSource":{"type":"github","owner":"usekana","repo":"docs","deployBranch":"main","contentDirectory":"","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a20c3424d01e0d38c5e46fb","collectionId":"42620ec8-c248-4cb9-b909-2d9ec855dc79","schemaVersion":"v2"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a20c3424d01e0d38c5e46fb:success","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"Documentation","count":53},{"language":"default","tag":"Guides","count":21},{"language":"default","tag":"Non-Technical","count":14},{"language":"default","tag":"Ruby","count":10},{"language":"default","tag":"Javascript","count":9},{"language":"default","tag":"Reference","count":8},{"language":"default","tag":"Integrations","count":7},{"language":"default","tag":"Admin API (Backend) Reference","count":7},{"language":"default","tag":"Client SDK (Frontend)","count":4},{"language":"default","tag":"Importing \u0026 Creating","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guides/javascript/subscribe-users-to-packages/subscribe-users-manually","slug":"/guides/javascript/subscribe-users-to-packages/subscribe-users-manually","pageMetadata":{"title":"Subscribe Users Manually","description":"If you want to subscribe users to packages without automatically doing so through a billing provider, you will need to manually do so.","href":"/guides/javascript/subscribe-users-to-packages/subscribe-users-manually"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"If you want to subscribe users to packages without automatically doing so through a billing provider, you will need to manually do so.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Check,CodeBlock,Heading,Note}=_components;if(!Check)_missingMdxReference(`Check`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`You will need to have details on:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`package(s)`}),` the user will subscribe`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`user`}),` who is going to be subscribed to the package`]}),`\n`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`If neither the user nor package exist yet in Kana, then you should create these first:`}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`/guides/ruby/importing-and-creating/create-users`,children:`Create Users`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`/non-technical/packages/create-new-packages`,children:`Create new packages`})}),`\n`,_jsxs(_components.p,{children:[`Once these are created, you will need to ensure you know the `,_jsx(_components.code,{children:`id`}),` of both.`]}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[`Both the `,_jsx(_components.code,{children:`id`}),` for a `,_jsx(_components.a,{href:`/reference/admin-api-backend-reference/objects#user`,children:`User`}),` and a `,_jsx(_components.a,{href:`/reference/admin-api-backend-reference/objects#package`,children:`Package`}),` are defined by you upon creation in Kana.`]}),_jsxs(_components.p,{children:[`You can find the identifiers for both in the `,_jsx(_components.a,{href:`https://dashboard.usekana.com`,children:`Dashboard`}),`, or by using the `,_jsx(_components.a,{href:`/reference/admin-api-backend-reference/queries#package`,children:`package`}),` and `,_jsx(_components.a,{href:`/reference/admin-api-backend-reference/queries#user`,children:`user`}),` queries to pull all respective records and grab the `,_jsx(_components.code,{children:`id `}),`from the one(s) you need`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`code-sample`,children:`Code Sample`}),`\n`,_jsx(Heading,{level:`3`,id:`basic`,children:`Basic`}),`\n`,_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`9`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`KanaAdmin`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@usekana/admin-kana-js'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` KanaAdmin`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` API_KEY`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Replace with own Private API Key`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`packageIds:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"basic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"124\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`19`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`KanaAdmin`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@usekana/admin-kana-js'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` KanaAdmin`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` API_KEY`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Replace with own Private API Key`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`app`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/subscribe'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`){`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` userId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`user`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Assumes user object has been sent in request body to this endpoint`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` packageIds`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`packageIds`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Assumes array of packageIds has been sent in request body to this endpoint`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`packageIds:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` packageIds`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` userId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"We experienced an error when attempting to susbcribe you. Try again or contact support.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Send back JSON response of full susbscription object`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsx(Check,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Congratulations`}),` 🎉 You’ve now successfully redirected a user to subscribe\nto Kana packages through Stripe.`]})}),`\n`,_jsx(_components.p,{children:`Upon successful payment, this user will be subscribed to the package(s) and will have access to the features within. You can now implement checks to confirm they should have access to these features (either in your frontend and/or backend) and record usage of these features - which is even more necessary when they are consumable features whereby a customer is provisioned a certain amount.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Subscribe Users Manually","description":"If you want to subscribe users to packages without automatically doing so through a billing provider, you will need to manually do so.","href":"/guides/javascript/subscribe-users-to-packages/subscribe-users-manually"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Code Sample","slug":"code-sample","depth":2,"children":[{"title":"Basic","slug":"basic","depth":3,"children":[]},{"title":"Example","slug":"example","depth":3,"children":[]}]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"usekana","siteName":"Kana","title":"Subscribe Users Manually - Kana","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T22:41:58.154Z","originalFileLocation":"guides/javascript/subscribe-users-to-packages/subscribe-users-manually.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"If you want to subscribe users to packages without automatically doing so through a billing provider, you will need to manually do so.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Kana\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/usekana/HlDtSaFWGDEDBkrj/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/usekana/HlDtSaFWGDEDBkrj/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/usekana/HlDtSaFWGDEDBkrj/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/usekana/HlDtSaFWGDEDBkrj/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/usekana/HlDtSaFWGDEDBkrj/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/usekana/HlDtSaFWGDEDBkrj/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/usekana/HlDtSaFWGDEDBkrj/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/usekana/HlDtSaFWGDEDBkrj/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/usekana/HlDtSaFWGDEDBkrj/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Subscribe Users Manually - Kana\">\u003cmeta data-mint-head property=\"og:description\" content=\"If you want to subscribe users to packages without automatically doing so through a billing provider, you will need to manually do so.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Kana\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages/subscribe-users-manually\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://usekana.mintlify.app/_mintlify/api/og/v2?division=Subscribe+Users+to+Packages\u0026amp;title=Subscribe+Users+Manually\u0026amp;description=If+you+want+to+subscribe+users+to+packages+without+automatically+doing+so+through+a+billing+provider%2C+you+will+need+to+manually+do+so.\u0026amp;theme=5a357f6b61199e4795d1eb0f\u0026amp;signature=9c88b639bbb37f74149ed87bf16997ab7997b0903146cc5b98d25a6f3388fcfc\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Subscribe Users Manually - Kana\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"If you want to subscribe users to packages without automatically doing so through a billing provider, you will need to manually do so.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://usekana.mintlify.app/_mintlify/api/og/v2?division=Subscribe+Users+to+Packages\u0026amp;title=Subscribe+Users+Manually\u0026amp;description=If+you+want+to+subscribe+users+to+packages+without+automatically+doing+so+through+a+billing+provider%2C+you+will+need+to+manually+do+so.\u0026amp;theme=5a357f6b61199e4795d1eb0f\u0026amp;signature=9c88b639bbb37f74149ed87bf16997ab7997b0903146cc5b98d25a6f3388fcfc\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/usekana/HlDtSaFWGDEDBkrj/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Kana\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5D5FEF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages/subscribe-users-manually\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/javascript/subscribe-users-to-packages/subscribe-users-manually.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.usekana.com/#organization\",\"name\":\"Kana\",\"url\":\"https://docs.usekana.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/usekana/Z2Fsz-a5lBmMYI5l/logo/light.svg?fit=max\u0026auto=format\u0026n=Z2Fsz-a5lBmMYI5l\u0026q=85\u0026s=5005e3a5b1de5d8de9c98739e45bf2b8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.usekana.com#website\",\"name\":\"Kana\",\"url\":\"https://docs.usekana.com\",\"publisher\":{\"@id\":\"https://docs.usekana.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages/subscribe-users-manually#webpage\",\"url\":\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages/subscribe-users-manually\",\"name\":\"Subscribe Users Manually\",\"description\":\"If you want to subscribe users to packages without automatically doing so through a billing provider, you will need to manually do so.\",\"dateModified\":\"2026-01-06T22:41:58.154Z\",\"isPartOf\":{\"@id\":\"https://docs.usekana.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages/subscribe-users-manually#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages/subscribe-users-manually#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.usekana.com/guides\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Javascript\",\"item\":\"https://docs.usekana.com/guides/javascript\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Subscribe Users to Packages\",\"item\":\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Subscribe Users Manually\",\"item\":\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages/subscribe-users-manually\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages/subscribe-users-manually#article\",\"headline\":\"Subscribe Users Manually\",\"name\":\"Subscribe Users Manually\",\"description\":\"If you want to subscribe users to packages without automatically doing so through a billing provider, you will need to manually do so.\",\"url\":\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages/subscribe-users-manually\",\"mainEntityOfPage\":{\"@id\":\"https://docs.usekana.com/guides/javascript/subscribe-users-to-packages/subscribe-users-manually#webpage\"},\"dateModified\":\"2026-01-06T22:41:58.154Z\",\"publisher\":{\"@id\":\"https://docs.usekana.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.usekana.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Kana\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Kana","nav":{"global":{"anchors":[{"anchor":"Pricing Index","href":"https://pricing-index.usekana.com/","icon":"tags"},{"anchor":"GraphiQL IDE","href":"https://api.usekana.com/graphql","icon":"chart-network","color":{"light":"#E535AB","dark":"#E535AB"}}]},"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Home","pages":[{"title":"Welcome","href":"/introduction"},{"title":"Quick Start","href":"/quick-start"},{"title":"Kana Concepts","href":"/kana-concepts"}]},{"group":"Guides","pages":[{"title":"Overview","href":"/guides"},{"group":"Javascript","pages":[{"title":"Overview","href":"/guides/javascript"},{"title":"Setup","href":"/guides/javascript/setup"},{"title":"Create Users","href":"/guides/javascript/create-users"},{"group":"Subscribe Users to Packages","pages":[{"title":"Subscribe Users to Packages","href":"/guides/javascript/subscribe-users-to-packages"},{"title":"Subscription Links","description":"If you're integrated with Stripe, Kana makes it easy to subscribe a customer through Stripe to a package.","href":"/guides/javascript/subscribe-users-to-packages/subscription-links"},{"title":"Subscribe Users Manually","href":"/guides/javascript/subscribe-users-to-packages/subscribe-users-manually"}]},{"title":"Record Feature Usage","description":"Kana needs to know whenever a user of your product has used a feature. It's a requirement so that we have accurate information on what feature's customers have used (and by how much) within the package(s) they have subscribed to.","href":"/guides/javascript/record-feature-usage"},{"title":"Block Feature Access (Backend)","href":"/guides/javascript/block-feature-access-backend"},{"title":"Block Feature Access (Frontend)","href":"/guides/javascript/block-feature-access-frontend"}]},{"group":"Ruby","pages":[{"title":"Overview","href":"/guides/ruby"},{"title":"Setup","href":"/guides/ruby/setup"},{"group":"Importing \u0026 Creating","pages":[{"title":"Overview","href":"/guides/ruby/importing-and-creating"},{"title":"Create Features","href":"/guides/ruby/importing-and-creating/create-features"},{"title":"Create Packages","href":"/guides/ruby/importing-and-creating/create-packages"},{"title":"Create Users","href":"/guides/ruby/importing-and-creating/create-users"}]},{"group":"Integrating Kana","pages":[{"title":"Overview","href":"/guides/ruby/integrating-kana"},{"title":"Subscribe Users to Plans","href":"/guides/ruby/integrating-kana/subscribe-users-to-plans"},{"title":"Record Feature Usage","href":"/guides/ruby/integrating-kana/record-feature-usage"},{"title":"Identify a User's Feature Entitlement","href":"/guides/ruby/integrating-kana/identify-a-users-feature-entitlement"}]}]},{"title":"Code Samples","href":"/code-samples"}]},{"group":"Admin API (Backend)","pages":[{"title":"Overview","href":"/admin-api-backend"},{"title":"Authorization (Backend)","href":"/admin-api-backend/authorization-backend"}]},{"group":"Client SDK (Frontend)","pages":[{"title":"Overview","href":"/client-sdk-frontend"},{"group":"Authorization (Frontend)","pages":[{"title":"Authorization Types","href":"/client-sdk-frontend/authorization-frontend"},{"title":"Simple Mode","href":"/client-sdk-frontend/authorization-frontend/simple-mode"},{"title":"Secure Mode","href":"/client-sdk-frontend/authorization-frontend/secure-mode"}]}]},{"group":"CLI","pages":[{"title":"Overview","href":"/cli"}]},{"group":"Reference","pages":[{"group":"Admin API (Backend) Reference","pages":[{"title":"Overview","href":"/reference/admin-api-backend-reference"},{"title":"Objects","href":"/reference/admin-api-backend-reference/objects"},{"title":"Scalars","href":"/reference/admin-api-backend-reference/scalars"},{"title":"Enums","href":"/reference/admin-api-backend-reference/enums"},{"title":"Inputs","href":"/reference/admin-api-backend-reference/inputs"},{"title":"Queries","href":"/reference/admin-api-backend-reference/queries"},{"title":"Mutations","href":"/reference/admin-api-backend-reference/mutations"}]},{"title":"Client SDK (Frontend) Reference","href":"/reference/client-sdk-frontend-reference"}]},{"group":"Non-Technical","pages":[{"group":"Features","pages":[{"title":"What are features?","href":"/non-technical/features/what-are-features"},{"title":"Create new features","href":"/non-technical/features/create-new-features"},{"title":"Edit an existing feature","href":"/non-technical/features/edit-an-existing-feature"}]},{"group":"Packages","pages":[{"title":"What are packages?","href":"/non-technical/packages/what-are-packages"},{"title":"Create new packages","href":"/non-technical/packages/create-new-packages"},{"title":"Edit an existing package","href":"/non-technical/packages/edit-an-existing-package"},{"title":"Publish a package","href":"/non-technical/packages/publish-a-package"}]},{"group":"Integrations","pages":[{"group":"Stripe Integration","pages":[{"title":"Integration Overview","href":"/non-technical/integrations/stripe-integration"},{"title":"Stripe Importation \u0026 Sync Overview","href":"/non-technical/integrations/stripe-integration/stripe-importation-and-sync-overview"},{"title":"Import Subscriptions from Stripe","href":"/non-technical/integrations/stripe-integration/import-subscriptions-from-stripe"}]},{"group":"Segment Integration","pages":[{"title":"Integration Overview","href":"/non-technical/integrations/segment-integration"},{"title":"Identify Users (Segment)","href":"/non-technical/integrations/segment-integration/identify-users-segment"},{"title":"Track Feature Usage (Segment)","href":"/non-technical/integrations/segment-integration/track-feature-usage-segment"},{"title":"Create new mapping rules","href":"/non-technical/integrations/segment-integration/track-feature-usage-segment/create-new-mapping-rules"}]}]}]}]}]},"title":"Subscribe Users Manually - Kana","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":[],"chunks":[]}