Skip to content

Jopaul07/nextjs-stripe-typescript

Repository files navigation

Example using Stripe with Next.js, TypeScript and react-stripe-js

This is a really simple project that shows the usage of Next.js with TypeScript.

Demo

The demo is running in test mode -- use 4242424242424242 as a test card number with any CVC + future expiration date.

Use the 4000000000003220 test card number to trigger a 3D Secure challenge flow.

Read more about testing on Stripe at https://stripe.com/docs/testing.

Run this locally

After running npm i executing npm run dev will start the application at port 3000. http://localhost:3000

Notes

When we run next dev the next time, Next.js will start looking for any .ts or .tsx files in our project and builds it. It even automatically creates a tsconfig.json file for our project with the recommended settings.

Next.js has built-in TypeScript declarations, so we'll get autocompletion for Next.js' modules straight away.

A type-check script is also added to package.json, which runs TypeScript's tsc CLI in noEmit mode to run type-checking separately. You can then include this, for example, in your test scripts.

nextjs-stripe-typescript

About

Next.js application written in Typescript with Stripe Payment integration and user registration using AWS Cognito.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •