{"id":23138720,"url":"https://github.com/triptych/userbase-stripe-netlify","last_synced_at":"2026-02-16T08:32:13.022Z","repository":{"id":66487726,"uuid":"354647844","full_name":"triptych/userbase-stripe-netlify","owner":"triptych","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-04T21:20:52.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T14:51:55.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/triptych.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-04-04T21:12:43.000Z","updated_at":"2021-04-04T21:20:54.000Z","dependencies_parsed_at":"2023-06-28T13:30:53.565Z","dependency_job_id":null,"html_url":"https://github.com/triptych/userbase-stripe-netlify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/triptych/userbase-stripe-netlify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fuserbase-stripe-netlify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fuserbase-stripe-netlify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fuserbase-stripe-netlify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fuserbase-stripe-netlify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/triptych","download_url":"https://codeload.github.com/triptych/userbase-stripe-netlify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fuserbase-stripe-netlify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29503809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T08:14:25.707Z","status":"ssl_error","status_checked_at":"2026-02-16T08:14:25.334Z","response_time":115,"last_error":"SSL_read: 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-12-17T13:11:37.416Z","updated_at":"2026-02-16T08:32:13.006Z","avatar_url":"https://github.com/triptych.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ugliest Todo using Netlify Functions \u0026 Stripe\n\n## Overview\n\nThis sample project uses Stripe's [client-only Checkout](https://stripe.com/docs/payments/checkout/client-only) to charge for a [one-time product](https://stripe.com/docs/payments/checkout/client) or a [recurring subscription](https://stripe.com/docs/payments/checkout/client-subscription) and uses [Netlify Functions](https://www.netlify.com/products/functions/) to handle the payment succeeded webhook to the update our Userbase user status to paid.\n\n- Demo: https://ugliest-todo-stripe.netlify.com/\n\n## Setup\n\n### Runing locally\n\n1. Create your `.env` file and add your secrets:\n\n```shell\ncp .env.example .env\n```\n\n2. Add your client-side identifiers to the [public/client_config.js](public/client_config.js) file.\n\n**Note:** make sure not to mix up the public identifiers in the `client_confi.js` with the secret keys in the `.env` file. The content of the `.env` file needs to be kept secret and never commited to git. That's why we have `.env` in our [.gitignore](.gitignore) file.\n\n3. Install the [Stripe CLI](https://github.com/stripe/stripe-cli#installation) \u0026 [login](https://github.com/stripe/stripe-cli/wiki/login-command) with your Stripe account.\n\n4. Start the webhook event forwarding:\n\n```shell\nstripe listen --forward-to http://localhost:34567/checkout\n```\n\n**Note:** The Stripe CLI will return your webhook signing secret: `whsec_1234`. Copy the secret and paste it into your `.env` file.\n\n5. In a separate terminal window, [install the Netlify cli](https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#netlify-functions)\n\n6. Install the dependencies for the function:\n\n```shell\nnpm install\n```\n\n6. Run the Netlify dev server\n\n```shell\nnetlify dev\n```\n\n🎉 Watch your terminal windows for webhook events and error logs.\n\n### Deploy to Netlify\n\nYour Netlify Function will have the following URL shape (`https://your-project-name.netlify.com/.netlify/functions/checkout`). Use this to create a live webhook endpoint [in your Stripe dashboard](https://stripe.com/docs/webhooks/setup#configure-webhook-settings).\n\nYour live webhook will have a different signing secret, which you can retrieve from the webhook details page. Use this secret in your Netlify deploy settings.\n\nThe Netlify deploy command will not set up the variables from your `.env` file. You will need to set up your secrets manually in the [Netlify build settings](https://app.netlify.com/sites/userbase-with-stripe/settings/deploys#environment-variables).\n\nNow run:\n\n```shell\nnetlify deploy --prod --functions=functions\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriptych%2Fuserbase-stripe-netlify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftriptych%2Fuserbase-stripe-netlify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriptych%2Fuserbase-stripe-netlify/lists"}