{"id":20763801,"url":"https://github.com/revenuecat/purchases-js","last_synced_at":"2026-04-16T10:04:53.623Z","repository":{"id":228635266,"uuid":"710005435","full_name":"RevenueCat/purchases-js","owner":"RevenueCat","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-15T09:07:12.000Z","size":6358,"stargazers_count":25,"open_issues_count":45,"forks_count":12,"subscribers_count":10,"default_branch":"main","last_synced_at":"2026-04-15T11:13:35.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/RevenueCat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.latest.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-10-25T20:15:43.000Z","updated_at":"2026-04-15T09:07:16.000Z","dependencies_parsed_at":"2024-03-19T19:28:36.955Z","dependency_job_id":"fbe915cb-179e-4c2d-93f5-c0c001201ff8","html_url":"https://github.com/RevenueCat/purchases-js","commit_stats":null,"previous_names":["revenuecat/purchases-js"],"tags_count":128,"template":false,"template_full_name":null,"purl":"pkg:github/RevenueCat/purchases-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueCat%2Fpurchases-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueCat%2Fpurchases-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueCat%2Fpurchases-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueCat%2Fpurchases-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RevenueCat","download_url":"https://codeload.github.com/RevenueCat/purchases-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueCat%2Fpurchases-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31880897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"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":[],"created_at":"2024-11-17T10:47:35.670Z","updated_at":"2026-04-16T10:04:53.618Z","avatar_url":"https://github.com/RevenueCat.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003e😻 In-App Subscriptions Made Easy 😻\u003c/h3\u003e\n\u003ch4 align=\"center\"\u003e🕸️ For the web 🕸️\u003c/h4\u003e\n\nRevenueCat is a powerful, reliable, and free to use in-app purchase server with cross-platform support.\nThis repository includes all you need to manage your subscriptions on your website or web app using RevenueCat.\n\nSign up to [get started for free](https://app.revenuecat.com/signup).\n\n# Prerequisites\n\nLogin @ [app.revenuecat.com](https://app.revenuecat.com)\n\n- Connect your Stripe account if you haven't already (More payment gateways are coming soon)\n- Create a Project (if you haven't already)\n- Add a new Web Billing app\n- Get the sandbox API key or production API key (depending on the environment)\n- Create some products for the Web Billing App\n- Create an offering and add packages with Web Billing products\n- Create the entitlements you need in your app and link them to the Web Billing products\n\n# Installation\n\n- Add the library to your project's dependencies\n  - npm\n    ```\n    npm install --save @revenuecat/purchases-js\n    ```\n  - yarn\n    ```\n    yarn add --save @revenuecat/purchases-js\n    ```\n\n# Usage\n\nSee the [RevenueCat docs](https://www.revenuecat.com/docs/web/web-billing) and the [SDK Reference](https://revenuecat.github.io/purchases-js-docs).\n\n# Development\n\n## Install the library in a local project\n\n- Clone the repository\n- Install dependencies\n- Build the library\n\n```bash\npnpm install\npnpm run build:dev\n```\n\nTo avoid publishing the package you can use pnpm's link feature:\n\n1. In the purchases-js directory, register the package:\n\n```bash\npnpm link\n```\n\n2. In your testing project, link to the registered package:\n\n```bash\npnpm link \"@revenuecat/purchases-js\"\n```\n\n\u003e **Note:** Any changes you make to the library will be automatically reflected in your testing project after running `pnpm run build:dev` or `pnpm run build`.\n\n## Running Storybook\n\n```bash\npnpm run storybook\n```\n\n### Environment Setup for Purchase Stories\n\n\u003e **Note:** This setup is only required if you need to test Storybook stories involving the `payment-entry` page.\n\nTo run these specific stories, you'll need to set up some environment variables. There are two options:\n\n### Option 1: Internal Teams\n\nInternal team members can find the required environment variables in 1Password.\n\n### Option 2: Setup Manually\n\n1. Create a test account in Stripe\n2. Create a `.env.development.local` file and set the following variables:\n\n```bash\nVITE_STORYBOOK_PUBLISHABLE_API_KEY=\"pk_test_1234567890\"\nVITE_STORYBOOK_ACCOUNT_ID=\"acct_1234567890\"\n```\n\n## Running tests\n\n```bash\npnpm run test\n```\n\n## Running linters\n\n```bash\npnpm run test:typecheck\npnpm run svelte-check\npnpm run prettier\npnpm run lint\n```\n\n## Running E2E tests\n\nPlease check the Demo app readme [here](./examples/webbilling-demo/README.md#e2e-tests)\n\n## Update API specs\n\n```bash\npnpm run extract-api\n```\n\nThis will update the files in `api-report` with the latest public API.\nIf it has uncommitted changes, CI tests will fail. Run this command and commit the changes if\nthey are expected.\n\n# Publishing a new version\n\nNew versions are automated weekly, but you can also trigger a new release through CircleCI or locally\nfollowing these steps:\n\n- Run `bundle exec fastlane bump` and follow the instructions\n- A PR should be created with the changes and a hold job in CircleCI.\n- Approve the hold job once tests pass. This will create a tag and continue the release in CircleCI\n- Merge the PR once it's been released\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevenuecat%2Fpurchases-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevenuecat%2Fpurchases-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevenuecat%2Fpurchases-js/lists"}