{"_id":"@alexa-skill-components/in-skill-purchase","_rev":"4-90926d2536025a8deea7de78897529b5","name":"@alexa-skill-components/in-skill-purchase","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@alexa-skill-components/in-skill-purchase","version":"0.0.1","license":"AmznSL-1.0","_id":"@alexa-skill-components/in-skill-purchase@0.0.1","maintainers":[{"name":"amazon-prachibh","email":"prachibh@amazon.com"},{"name":"amzn-aaditya","email":"aadified@amazon.com"},{"name":"abhjroy","email":"abhjroy@amazon.com"},{"name":"mattsb42-aws","email":"bullocm@amazon.com"},{"name":"amzn-anusha","email":"panuanu@amazon.com"},{"name":"anuprk","email":"anukatar@amazon.com"},{"name":"amzn-akeat","email":"akeat@amazon.com"},{"name":"amzn-oss","email":"osa-3p@amazon.com"}],"homepage":"https://github.com/alexa/skill-components#readme","bugs":{"url":"https://github.com/alexa/skill-components/issues"},"ask":{"srcDir":"src"},"dist":{"shasum":"fd3f9ed6a0d806edfe9527a1fa89188b5ac420bc","tarball":"https://registry.npmjs.org/@alexa-skill-components/in-skill-purchase/-/in-skill-purchase-0.0.1.tgz","fileCount":53,"integrity":"sha512-8mXoqVS+aB908ru44uspuxEe9M+v8Io2rH09x+UX2paQ5WKTaPTf2tQDCD5MLvUaZp+aJt7zAibafyuIxmnm/Q==","signatures":[{"sig":"MEUCIQDNJLjBMPPXXrwqG2k6GD/qFbIZ1wBS/ddhHYnyZzfspAIgcRJ+WMs/sN0PRaqh9KtarBLSOS+hwbw/KMit4R0CQ6s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGu/3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqdQ//Q3GrGhfGGb7QKqe4i/GYSQvR9SWoCF1FXwwsvWyDjO4gY7rE\r\ntsPBb12/c3mM9b9Lu1+pcl5GU2jxskINNekeSo3S+UFk4wabD5uErpxD6VSs\r\nj+OLWKwaPRiu8VdPl6qNBHSdklkOC2ZDPHZkv8EPyEEAJECkbYiqRXx/IC9s\r\n9tOOtsQ8lnqa7fSBslgIDvB3EAh5PXFlW2HEgRKrk8t10RUkbcKAk2bAwsth\r\nbY04Eukx0zTiS1FVza2Q/HN2yYXDGB84QPJ7UNHCBMmsnOkSt/UTvLfFwtiY\r\nJQaTwwc3Y/svgCmKh1OO3o+Ccv5UbI4qmlas6lKkOfOzzd4YDXJGxo4jRuL5\r\nXZgpXzsmTx9/ByXA2gQPRkEe46jM64O3NKnjhfnQlZbnEsWj11o0ZqJDDb08\r\nfIzUJ3n0pRO4U0tzXZVCWqlFmpN/x23vI5O3x4DQ2cjac028I5puNGfaaT+F\r\n98GxDV9Hi3K8jUqs/i7elv35Viz9mrcW+QOA5XacPCcbqvM4W3zYmT6lARXX\r\nVY8LwGYSgT0qIImp0zBAmuuc5DMMXDwPzvR0nkvobNFYblcbsUpk90CeeRzX\r\nk1haXHfNs3Ma+8+mxZY3xgxpUhG0mHtKg1jIxtGCs9Ac50nvzgt7NYz4v/50\r\nC0X66pGNzDP7+v8kp/IAGsSBy/1ogmWGThw=\r\n=jJUs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint --fix --max-warnings 0 -c .eslintrc.js 'src/**/*.{ts,tsx}'","test":"jest --testTimeout=10000","build":"npm run compile && npm pack","clean":"rm -rf dist && rm -rf build && rm -rf node_modules && rm -rf package-lock.json && rm -rf *.tgz","compile":"npm run compile-ts && npm run compile-acdl","release":"npm run build && npm run lint && npm run test","compile-ts":"tsc","clean-build":"npm run clean && npm install && npm run build","compile-acdl":"acc","clean-release":"npm run clean && npm install && npm run release","prepublishOnly":"npm run build"},"_npmUser":{"name":"amazon-prachibh","email":"prachibh@amazon.com"},"publisher":"Amazon","repository":{"url":"git+ssh://git@github.com/alexa/skill-components.git","type":"git","directory":"in-skill-purchase"},"_npmVersion":"6.14.16","description":"Alexa skill component for in-skill purchase","directories":{},"_nodeVersion":"12.22.12","dependencies":{"ask-sdk":"^2.6.0","ask-sdk-core":"^2.10.1","ask-sdk-model":"^1.18.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","eslint":"^7.2.0","ts-jest":"^26.5.6","ts-loader":"^9.2.0","ts-mockito":"2.5.0","typescript":"^4.7.3","@alexa/acdl":"^0.1.13","@types/jest":"^26.0.24","@types/node":"^17.0.40","@types/lodash":"^4.14.181","jest-html-reporter":"3.2.0","eslint-plugin-import":"^2.22.1","@typescript-eslint/parser":"^3.3.0","@typescript-eslint/eslint-plugin":"^3.10.1"},"_npmOperationalInternal":{"tmp":"tmp/in-skill-purchase_0.0.1_1662709751543_0.5374242934777416","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@alexa-skill-components/in-skill-purchase","version":"0.0.2","license":"AmznSL-1.0","_id":"@alexa-skill-components/in-skill-purchase@0.0.2","maintainers":[{"name":"amazon-prachibh","email":"prachibh@amazon.com"},{"name":"amzn-aaditya","email":"aadified@amazon.com"},{"name":"abhjroy","email":"abhjroy@amazon.com"},{"name":"mattsb42-aws","email":"bullocm@amazon.com"},{"name":"amzn-anusha","email":"panuanu@amazon.com"},{"name":"anuprk","email":"anukatar@amazon.com"},{"name":"amzn-akeat","email":"akeat@amazon.com"},{"name":"amzn-oss","email":"osa-3p@amazon.com"}],"homepage":"https://github.com/alexa/skill-components#readme","bugs":{"url":"https://github.com/alexa/skill-components/issues"},"ask":{"srcDir":"src"},"dist":{"shasum":"1ca814bf0b8b26bb8009dd840f7c4b5eaf295927","tarball":"https://registry.npmjs.org/@alexa-skill-components/in-skill-purchase/-/in-skill-purchase-0.0.2.tgz","fileCount":53,"integrity":"sha512-mJjiCW29AejBGzB7Urs7D1e4GILnksnKTf9Es1CCY7BEGM/chQYW+0Q5cBGBkaPlyX3EH6eQumWdn2ojhqSQ3A==","signatures":[{"sig":"MEQCIAQY37WE5d3g2blpodwlUZTpGe8seOt3ovCeiO9iK2dPAiAg2stO4UPsgjWE5ptWfluSYRCRAi2E1HXktw33yHlhsw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":308103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmwUfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoAmA//UMrDZJil/aJ5cLGd7MZa6+Eic9VyR9i/P5ckKfPl9jfWsQTm\r\nkmwR9Y8EFDymVV331bldOORA5np0nyTQHGo1V1C01nkEgHGPeEYeThdNxzZl\r\nfW9wmMSfPy4wnt24Ppmb57hloT4vD9OuLaiB6xScYyLVci2uLSjj7pybRI/m\r\nDhcHeFMZxH/x5LamXLPqxZcDB68VttfoVoi8/wdUR4HwzwvrQDP3sw4uRhCF\r\nUpIlV1BAV6blzBHkIfGkpm/HZCymJskCr8qUJDQpuUo1vyugmI8SdWcLcgQK\r\n3k5sj4VaQWkFrKTFiWzJK3J53nG950WZVm8sKrNMI7R2OxLEsNnsqnfun2Sx\r\nuHykVhHwM/FOFKSGeECmejgvuapCDA1E7+x1aFox5XP5Ie4DJyC5e16pi2zn\r\nmQAT/XU5zCVyC/TtqRymvAmAt6wS1+Dd+S9uepbPeY/AZP/o88TqnADVq/Y+\r\nyzqYzrrTlMCB1NNqXxHRn5Nt7ifBD1BSzZAfn9wx8ROPZkBEaOSvljroGm39\r\nBSrdjWILt1hGBBqF7wYXqlyy1tmwRyfiSmopNdpSsj7xmtOplnNPteWbxldm\r\nMdts86Xr7z1ymgMA1utZqvOH5ePqoxxIOco6BCa21I+XoVnoU1nuat1m9ofi\r\nl82d7B3u0J+1o9b5suSlph1mGjkbjc/X6c4=\r\n=Sg7g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"eslint --fix --max-warnings 0 -c .eslintrc.js 'src/**/*.{ts,tsx}'","test":"jest --testTimeout=10000","build":"npm run compile && npm pack","clean":"rm -rf dist && rm -rf build && rm -rf node_modules && rm -rf package-lock.json && rm -rf *.tgz","compile":"npm run compile-ts && npm run compile-acdl","release":"npm run build && npm run lint && npm run test","compile-ts":"tsc","clean-build":"npm run clean && npm install && npm run build","compile-acdl":"acc","clean-release":"npm run clean && npm install && npm run release","prepublishOnly":"npm run build"},"_npmUser":{"name":"amazon-prachibh","email":"prachibh@amazon.com"},"publisher":"Amazon","repository":{"url":"git+ssh://git@github.com/alexa/skill-components.git","type":"git","directory":"in-skill-purchase"},"_npmVersion":"6.14.17","description":"Alexa skill component for in-skill purchase","directories":{},"_nodeVersion":"14.21.1","dependencies":{"ask-sdk":"^2.6.0","ask-sdk-core":"^2.10.1","ask-sdk-model":"^1.18.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","eslint":"^7.2.0","ts-jest":"^26.5.6","ts-loader":"^9.2.0","ts-mockito":"2.5.0","typescript":"^4.7.3","@alexa/acdl":"^0.1.13","@types/jest":"^26.0.24","@types/node":"^17.0.40","@types/lodash":"^4.14.181","jest-html-reporter":"3.2.0","eslint-plugin-import":"^2.22.1","@typescript-eslint/parser":"^3.3.0","@typescript-eslint/eslint-plugin":"^3.10.1"},"_npmOperationalInternal":{"tmp":"tmp/in-skill-purchase_0.0.2_1671103775152_0.08122096833542969","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@alexa-skill-components/in-skill-purchase","version":"0.0.3","license":"AmznSL-1.0","_id":"@alexa-skill-components/in-skill-purchase@0.0.3","maintainers":[{"name":"amazon-prachibh","email":"prachibh@amazon.com"},{"name":"amzn-aaditya","email":"aadified@amazon.com"},{"name":"abhjroy","email":"abhjroy@amazon.com"},{"name":"mattsb42-aws","email":"bullocm@amazon.com"},{"name":"amzn-anusha","email":"panuanu@amazon.com"},{"name":"anuprk","email":"anukatar@amazon.com"},{"name":"amzn-akeat","email":"akeat@amazon.com"},{"name":"amzn-oss","email":"osa-3p@amazon.com"}],"homepage":"https://github.com/alexa/skill-components#readme","bugs":{"url":"https://github.com/alexa/skill-components/issues"},"ask":{"srcDir":"src"},"dist":{"shasum":"415401d946ad06905e38d7b48ec552e89400ad5e","tarball":"https://registry.npmjs.org/@alexa-skill-components/in-skill-purchase/-/in-skill-purchase-0.0.3.tgz","fileCount":53,"integrity":"sha512-GvcmVVfrKtodxfsgbTAfwniJPVttqw9d9IE0UAXZzt5H4kwBAKiOYDzbrXgru4UysJ2SEDrz3NN9Jm3dEPG0QA==","signatures":[{"sig":"MEYCIQCgyXh+v+xjJq59DeB7tVnOVmAtyb0J6//x8jgBIKa+XgIhAJgYyO2w/aA7Rln1l7LvdIh42ciGn6RTu8tCip30XSUM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":308452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7iHYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+hQ//aUnFNKXJ91paamuYLlBkPDstFoqYfaUN+lH3vavvFajWI9Fh\r\nl3CVnKufGTUobp06JIY6B1pPHbJpyUs5ZmoSWZKr/jLvtmLYmhd9+TYkpUP3\r\nMT0EUeUqlQVig1EpDXSbjsTDgoIYzy48ysdi9K/2igEyU+enKImGU/Q0lOS5\r\ndo2R+k2owqGw6gqDMP1bjrCYyNQwQu85J89Gi5zE2+s2PhGLJ9YCcXjsAu1h\r\nwl0reexX4ugObsu3q4r9cCvMVkPP3KXjV421KHRBoatIRPxr5ulVdp+mxGdH\r\n1Aulfg6Ww7ZPfQsxDVb4qLxl65rAITI+cw1qMyPQkXqwKlqs3rjcCDMkjWN6\r\nB3sY8xX97R/KHl5LKFGKEfW/gzsVfU8eGdoEP82xY+nKk+017AIYpGztAPaY\r\n87YQJ04IXslY32GttiwrI8mlKUHBJuvbZ3CJFRvFzJW6D/97Qf+THtIJplVA\r\nUddzhvQ/j9iw05ZWq7uzyN9y9QfEFDnfFDl96DdmVH0t/KEsY8aHSx0Yv/cs\r\nyKw7+zJF6NoT1gh9osOAf0ns0SbQOnevBYLbWeMfBf6C5bgm8yviZElFcVQh\r\nlMgLZRi3+69GuEmySX8V3UvCkzp25/ezYoI4myywCVz6LaBwv7fn8G9mXy4T\r\nirvMsYyaIDZzgZMxcA45PW7U7M7p5cNqNCs=\r\n=X3SH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"818f5ec9b6e84b020a310efc7e382822bf2e604f","scripts":{"lint":"eslint --fix --max-warnings 0 -c .eslintrc.js 'src/**/*.{ts,tsx}'","test":"jest --testTimeout=10000","build":"npm run compile && npm pack","clean":"rm -rf dist && rm -rf build && rm -rf node_modules && rm -rf package-lock.json && rm -rf *.tgz","compile":"npm run compile-ts && npm run compile-acdl","release":"npm run build && npm run lint && npm run test","compile-ts":"tsc","clean-build":"npm run clean && npm install && npm run build","compile-acdl":"acc","clean-release":"npm run clean && npm install && npm run release","prepublishOnly":"npm run build"},"_npmUser":{"name":"amzn-aaditya","email":"aadified@amazon.com"},"publisher":"Amazon","repository":{"url":"git+ssh://git@github.com/alexa/skill-components.git","type":"git","directory":"in-skill-purchase"},"_npmVersion":"8.19.3","description":"Alexa skill component for in-skill purchase","directories":{},"_nodeVersion":"19.2.0","dependencies":{"ask-sdk":"^2.6.0","@types/node":"^18.13.0","ask-sdk-core":"^2.10.1","ask-sdk-model":"^1.18.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","eslint":"^7.2.0","ts-jest":"^26.5.6","ts-loader":"^9.2.0","ts-mockito":"2.5.0","typescript":"^4.7.3","@alexa/acdl":"^0.1.13","@types/jest":"^26.0.24","@types/lodash":"^4.14.181","jest-html-reporter":"3.2.0","eslint-plugin-import":"^2.22.1","@typescript-eslint/parser":"^3.3.0","@typescript-eslint/eslint-plugin":"^3.10.1"},"_npmOperationalInternal":{"tmp":"tmp/in-skill-purchase_0.0.3_1676550616703_0.15316025876378903","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-09-09T07:49:11.464Z","modified":"2025-05-22T20:53:34.478Z","0.0.1":"2022-09-09T07:49:11.824Z","0.0.2":"2022-12-15T11:29:35.347Z","0.0.3":"2023-02-16T12:30:16.873Z"},"bugs":{"url":"https://github.com/alexa/skill-components/issues"},"license":"AmznSL-1.0","homepage":"https://github.com/alexa/skill-components#readme","repository":{"url":"git+ssh://git@github.com/alexa/skill-components.git","type":"git","directory":"in-skill-purchase"},"description":"Alexa skill component for in-skill purchase","maintainers":[{"email":"osa-3p@amazon.com","name":"amzn-oss"},{"email":"akeat@amazon.com","name":"amzn-akeat"},{"email":"anukatar@amazon.com","name":"anuprk"},{"email":"aadified@amazon.com","name":"amzn-aaditya"},{"email":"prachibh@amazon.com","name":"amazon-prachibh"}],"readme":"<h1 align= \"center\"> In-Skill Purchasing Skill Component </h1>\n\nGather feedback on interactions to help drive skill development.\n\n**Please note**: Alexa Skill Components are provided as a pre-production\nalpha release in developer preview with limited support. Our goal is to\nsolicit feedback on our approach and design building towards their\nbroader general availability in the future. While we will make every\neffort to minimize it, we do not make any backwards compatibility or\nrapid turn-around bug-fix promises with this pre-production alpha\nrelease. You can [sign up for the developer\npreview](https://build.amazonalexadev.com/2022-Skill-Components-Interest.html)\nto use these components.\n\nAmazon is actively making updates to these components and looks forward\nto your feedback. Check back to get the latest version.\n\n[Sign up to join\nus](https://build.amazonalexadev.com/2022-Skill-Components-Interest.html)\nin our effort to help you build more engaging Alexa skills faster!\n\nTable of Contents\n-----------------\n\n-   [Introduction](https://github.com/alexa/skill-components/tree/main/in-skill-purchase#introduction)\n    -   [When should I use this\n        component?](https://github.com/alexa/skill-components/tree/main/in-skill-purchase#when-should-i-use-this-component)\n    -   [Example\n        Interaction](https://github.com/alexa/skill-components/tree/main/in-skill-purchase#example-interaction)\n-   [Getting\n    Started](https://github.com/alexa/skill-components/tree/main/in-skill-purchase#getting-started)\n-   [Reference](https://github.com/alexa/skill-components/tree/main/in-skill-purchase#reference)\n\nIntroduction\n------------\n\n[In-skill\npurchasing](https://developer.amazon.com/en-US/docs/alexa/in-skill-purchase/isp-overview.html)\n(ISP) lets you sell premium digital content, such as hints in a trivia\nskill or additional lives in custom skills. ISP supports three payment\nmodels: one-time purchases, consumables, and subscriptions. The ISP\nskill component lets you add in-skill purchasing workflow to your skill\nas a pre-built voice experience. At this time, the component supports\nsubscriptions only. Subscriptions offer access to premium content or\nfeatures for a period of time, charged on a recurring basis until the\nuser cancels the subscription.\n\nAlexa Skill Components encapsulate best customer experience design\npractices to reduce your development time. To learn more about Skill\nComponents, see Alexa Skill Components Getting Started.\n\n### When should I use this component?\n\nAre you building an app in which you would like the customer to add the\nin-skill purchasing workflow into the skill, which lets Alexa Skill\ndevelopers to sell premium content, such as game features or any other\nsubscription in custom skills. Use the pre-built interaction patterns\nwithin the In-Skill Purchase Component to build out and customize such\ninteractions.\n\n### Example Interaction\n\nThe following interactions show a skill that offers three types of\nin-skill products: value subscription, premium subscription, and elite\nsubscription.\n\nThe following example shows a purchase suggestion.\n```\nUser > What can I buy?\n\nAlexa > With our value subscription, you can access 45+ mindful\nsessions; with our premium subscription, you can add 150+ guided\nworkouts, and with our elite subscription, you can set up dedicated\nsessions with our certified trainers. Which one would you like to learn\nmore about?\n\nUser > Tell me more about the elite subscription\n\nAlexa > Elite subscription is free for 7 days. Then, you’ll be\ncharged \\$0.99 a month plus tax. Cancel anytime. Check the Alexa app for\nterms. Should I start your free trial?\n\nUser > Yes\n\nAlexa > Great! You're signed up.\n\n```\nThe following example shows a cancellation.\n```\nUser > Cancel elite subscription\n\nAlexa > Okay! As a reminder, with elite subscription you can set up\ndedicated sessions with our certified trainers. Are you sure you want to\ncancel your subscription?\n\nUser > Yes\n\nAlexa > Okay, I've canceled elite subscription, and you'll no longer\nbe charged. You can continue to use it until the end of this\nsubscription period.\n\n```\n\nGetting Started\n---------------\n\n### To get started with the ISP skill component, complete the following steps.\n\n### Familiarize yourself with Alexa Skill Components.\n\nRead the [Skill Components Getting Started\nguide](https://github.com/alexa/skill-components/blob/main/README.md#getting-started).\nIf you're unfamiliar with skill development, the [flight search example\nskill\ntutorial](https://developer.amazon.com/en-US/docs/alexa/workshops/acdl-flightsearch-tutorial/get-started/index.html)\nis a good starting place.\n\n### Add in-skill purchase products to your existing skill.\n\na.  Make sure that you have an existing ACDL Alexa Skill or [Get Started\n    with ACDL Alexa\n    Skill](https://developer.amazon.com/en-US/docs/alexa/conversations/acdl-get-started.html) \n    \nb.  [Create and Manage In-Skill\n    Products](https://developer.amazon.com/en-US/docs/alexa/in-skill-purchase/create-isp-dev-console.html)\n    \n**Note**: For this version Amazon supports the subscription payment model only.\n\n### Install the ISP skill component in your skill.\n\nMake sure that the package.json file exists in the skill's root\ndirectory. You can create a package.json file with the following\ncommand:\n```\nnpm init\n\n```\n\nYou can install the component from the public release or a local build\nof the component.\n\n**Public Release**\n\n1.  In your skill's root directory, install using npm.\n\n```\nnpm install --save @alexa-skill-components/in-skill-purchase\nnpm install\n\n```\n\n2.  Install the component as a dependency in your API code (AWS\n    Lambda function).\n    \n```\nnpm install --save @alexa-skill-components/in-skill-purchase\nnpm install\n\n```\n\n**Local Build**\n\n1.  In a separate directory from your skill, build the component\n    from source.\n\n```\ngit clone git@github.com:alexa/skill-components.git\ncd skill-components\ncd in-skill-purchase\nnpm run clean-build\n\n```\n\n2.  In your skill's root directory, use npm to install the local build.\n\n```\nnpm install --save \"&lt;path>/skill-components/in-skill-purchase\"\nnpm install\n\n```\n\n3.  Install the component as a dependency in your API code (AWS Lambda\n    function):\n\n```\nnpm install --save \"&lt;path>/skill-components/in-skill-purchase\"\nnpm install\n\n```\n\n### Call the reusable dialog\n\n1\\. Invoke the purchase suggestion dialog in your existing ACDL dialog.\nChoose where you want to direct the user to select a product or start\nthe purchase flow with a product specified. To do this, import the ISP\ncomponent, and then call\n[buySpecificProduct](https://github.com/alexa/skill-components/blob/main/in-skill-purchase/docs/REFERENCE.md#buySpecificProduct).\nThe following example code shows the purchase dialog invocation.\n\n```\nnamespace com.example.skill.name\n\nimport com.amazon.alexa.skill.components.inSkillPurchase.purchase.buySpecificProduct \n\ndialog Nothing GameDialog {\n\ndialog Nothing RideHailerDialog {\n    sample {\n        ...\n        ...\n        buySpecificProduct()\n        ...\n        ...\n    }\n}\n```\n\n2\\. Invoke the upsell reusable dialog in your existing ACDL dialog at the\npoint where you want to promote a product to user. To do this, import\nthe ISP component, and then call\n[upsell](https://github.com/alexa/skill-components/blob/main/in-skill-purchase/docs/REFERENCE.md#upsell)\n. The following example code shows the upsell dialog invocation.\n\n```\nnamespace com.example.skill.name\n\nimport com.amazon.alexa.skill.components.inSkillPurchase.upsell.upsell\n\ndialog Nothing GameDialog {\n\ndialog Nothing RideHailerDialog {\n    sample {\n        ...\n        ...\n        upsell(upsellMessage, productName)\n        ...\n        ...\n    }\n}\n\n```\n\n3\\. Invoke the cancel reusable dialog in your existing ACDL dialog at the\npoint where you want to allow the user to cancel the purchase of any\nproduct. To do this, import the ISP component, and then call\n[cancelPurchase](https://github.com/alexa/skill-components/blob/main/in-skill-purchase/docs/REFERENCE.md#cancelPurchase).\nThe following example code shows the cancel dialog invocation.\n\n```\nnamespace com.example.skill.name\n\nimport com.amazon.alexa.skill.components.inSkillPurchase.cancel.cancelPurchase\n\ndialog Nothing GameDialog {\n\ndialog Nothing RideHailerDialog {\n    sample {\n        ...\n        ...\n        cancelPurchase()\n        ...\n        ...\n    }\n}\n```\n\n4\\. Invoke the resume reusable dialog in your existing ACDL dialog at the\npoint where you want to resume the skill after the purchase, cancel, and\nupsell dialogs complete. To do this, import the ISP component, and then\ncall\n[resumeAfterPurchase](https://github.com/alexa/skill-components/blob/main/in-skill-purchase/docs/REFERENCE.md#resumeAfterPurchase).\nThe following example code shows the resume dialog invocation.\n\n```\nnamespace com.example.skill.name\n\nimport com.alexa.reusable.component.inSkillPurchase.resume.resumeAfterPurchase\n\ndialog Nothing GameDialog {\n\ndialog Nothing RideHailerDialog {\n    sample {\n        ...\n        ...\n        buySpecificProduct()\n        ...\n        resumeAfterPurchase()\n        ...\n        ...\n    }\n}\n```\n\n### Setup API Handlers\n\n**1. Register API handlers**\n\nImport the API handlers  into your main Lambda index.js file.\n\n**TypeScript**\n```\nimport { InSkillPurchase } from '@alexa-skill-components/in-skill-purchase';\n\nexports.handler = Alexa.SkillBuilders.custom()\n    .addRequestHandlers(\n         // your existing handler declarations\n         ...InSkillPurchase.createHandlers(),\n    )\n    .withApiClient(new DefaultApiClient()) // for monetizationServiceClient\n    .lambda();\n```\n\n**JavaScript**\n```\nconst isp = require('@alexa-skill-components/in-skill-purchase')\nconst DefaultApiClient = require('ask-sdk-core').DefaultApiClient;\n\nexports.handler = Alexa.SkillBuilders.custom()\n    .addRequestHandlers(\n        // your existing handler declarations\n       ...isp.InSkillPurchase.createHandlers()\n    )\n    .withApiClient(new DefaultApiClient()) // for monetizationServiceClient\n    .lambda();\n```\n\n### Compile and deploy your Skill.\n\nBuild your skill as normal. The component's dialogs samples and API\nhandlers that you integrated into the skill are built along-side your\nskill's own custom dialog samples and handlers. To build and deploy your\nskill, run the following command:\n\n```\naskx compile && askx deploy\n```\n\n**Note**: An Alexa Conversations skill deployment can take 20-40 minutes to\ncomplete.\n\n### Test your Skill.\n\nTo simulate your Alexa device, you can test your skill in the Alexa\nDeveloper Console on the **Test** tab Or, you can test your skill by\nusing the Alexa Skills Kit CLI.\n\nTo test your skill by using the CLI, run the following command:\n```\naskx dialog -s <YOUR_SKILL_ID> -l en-US -g development\n\n```\n\n### Iterate on the reusable dialogs\n\nAfter you test the default behavior of the component, you can customize\nthe ISP component. For details about customizations, see [ACDL Reusable\nDialogs\nreference](https://github.com/alexa/skill-components/blob/main/in-skill-purchase/docs/REFERENCE.md).\n\nTo compile and deploy changes, run the following command:\n\n```\naskx compile && askx deploy\n```\n\nReference\n---------\n\nDetails on all dialogs can be found in the [Reference\ndoc](https://github.com/alexa/skill-components/blob/main/in-skill-purchase/docs/REFERENCE.md)\n\nGot Feedback?\n-------------\n\nAmazon welcomes your feedback. Connect with us on\n[here](https://github.com/alexa/skill-components#support).\n\nLicense\n-------\n\nCopyright 2022 Amazon.com, Inc., or its affiliates. All rights reserved.\nYou may not use this file except in compliance with the terms and\nconditions set forth in the accompanying [LICENSE](https://github.com/alexa/skill-components/blob/main/LICENSE) file. THESE MATERIALS\nARE PROVIDED ON AN \"AS IS\" BASIS. AMAZON SPECIFICALLY DISCLAIMS, WITH\nRESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS, IMPLIED, OR\nSTATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.\n","readmeFilename":"README.md"}