{"id":20312934,"url":"https://github.com/fardinhash/stripe-checkout-typescript","last_synced_at":"2026-05-08T05:55:08.223Z","repository":{"id":238482395,"uuid":"796648429","full_name":"FardinHash/stripe-checkout-typescript","owner":"FardinHash","description":"Stripe Checkout with Next.js \u0026 TypeScript","archived":false,"fork":false,"pushed_at":"2024-05-15T10:56:39.000Z","size":3365,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"stripe-end","last_synced_at":"2025-01-14T12:27:40.346Z","etag":null,"topics":["javascript","nextjs","stripe","stripe-api","stripe-checkout","stripe-payment","stripe-payments","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/FardinHash.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":"2024-05-06T11:10:33.000Z","updated_at":"2025-01-10T12:53:30.000Z","dependencies_parsed_at":"2024-05-06T12:30:57.720Z","dependency_job_id":"f57d2e4b-85bf-4a8c-9475-4671d8d6754f","html_url":"https://github.com/FardinHash/stripe-checkout-typescript","commit_stats":null,"previous_names":["fardinhash/stripe-checkout-typescript"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FardinHash%2Fstripe-checkout-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FardinHash%2Fstripe-checkout-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FardinHash%2Fstripe-checkout-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FardinHash%2Fstripe-checkout-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FardinHash","download_url":"https://codeload.github.com/FardinHash/stripe-checkout-typescript/tar.gz/refs/heads/stripe-end","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241812015,"owners_count":20024300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["javascript","nextjs","stripe","stripe-api","stripe-checkout","stripe-payment","stripe-payments","typescript"],"created_at":"2024-11-14T18:08:13.770Z","updated_at":"2025-12-02T08:03:32.589Z","avatar_url":"https://github.com/FardinHash.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stripe Checkout with Next.js \u0026 TypeScript\n\n## Included functionality\n\n- Stripe Checkout [Check stripe-end branch]\n  - Custom Amount Donation with redirect to Stripe Checkout:\n    - Server Component: [app/stripe-checkout/page.tsx](app/stripe-checkout/page.tsx)\n    - Server Action: [app/actions/stripe.ts](app/actions/stripe.ts)\n    - Checkout Session 'success' page fetches the Checkout Session object from Stripe: [stripe-checkout/result/page.tsx](app/stripe-checkout/result/page.tsx)\n- Stripe Elements [Check master branch]\n  - Custom Amount Donation with Stripe Payment Element \u0026 PaymentIntents:\n    - Server Component: [app/stripe-with-elements/page.tsx](app/stripe-with-elements/page.tsx)\n    - Server Action: [app/actions/stripe.ts](app/actions/stripe.ts)\n    - Payment Intent 'success' page (via `returl_url`) fetches the Payment Intent object from Stripe: [stripe-with-elements/result/page.tsx](app/stripe-with-elements/result/page.tsx)\n- Webhook handling for [post-payment events](https://stripe.com/docs/payments/handling-payment-events)\n  - Route Handler: [app/api/webhooks/route.ts](app/api/webhooks/route.ts)\n\n### Required configuration\n\nCopy the `.env.local.example` file into a file named `.env.local` in the root directory of this project:\n\n```bash\ncp .env.local.example .env.local\n```\n\nYou will need a Stripe account ([register](https://dashboard.stripe.com/register)) to run this sample. Go to the Stripe [developer dashboard](https://dashboard.stripe.com/apikeys) to find your API keys and replace them in the `.env.local` file.\n\n```bash\nNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\u003creplace-with-your-publishable-key\u003e\nSTRIPE_SECRET_KEY=\u003creplace-with-your-secret-key\u003e\n```\n\nNow install the dependencies and start the development server.\n\n```bash\nnpm install\nnpm run dev\n# or\nyarn\nyarn dev\n```\n\n### Forward webhooks to your local dev server\n\nFirst [install the CLI](https://stripe.com/docs/stripe-cli) and [link your Stripe account](https://stripe.com/docs/stripe-cli#link-account).\n\nNext, start the webhook forwarding:\n\n```bash\nstripe listen --forward-to localhost:3000/api/webhooks\n```\n\nThe CLI will print a webhook secret key to the console. Set `STRIPE_WEBHOOK_SECRET` to this value in your `.env.local` file.\n\n### Setting up a live webhook endpoint\n\nAfter deploying, copy the deployment URL with the webhook path (`https://your-url.vercel.app/api/webhooks`) and create a live webhook endpoint [in your Stripe dashboard](https://stripe.com/docs/webhooks/setup#configure-webhook-settings).\n\nOnce created, you can click to reveal your webhook's signing secret. Copy the webhook secret (`whsec_***`) and add it as a new environment variable in your [Vercel Dashboard](https://vercel.com/dashboard):\n\n- Select your newly created project.\n- Navigate to the Settings tab.\n- In the general settings scroll to the \"Environment Variables\" section.\n\nAfter adding an environment variable you will need to rebuild your project for it to become within your code. Within your project Dashboard, navigate to the \"Deployments\" tab, select the most recent deployment, click the overflow menu button (next to the \"Visit\" button) and select \"Redeploy\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffardinhash%2Fstripe-checkout-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffardinhash%2Fstripe-checkout-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffardinhash%2Fstripe-checkout-typescript/lists"}