Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
OverviewSee all productsQuickstarts
Start building
Start developing
    Set up your development environment
    Send your first API request
    Build and test new features
    Go-live checklist
    Release phases
About the APIs
Build with an LLM
Use Stripe without code
Set up Stripe
Create an account
Migrate to Stripe
United States
English (United Kingdom)
HomeGet startedStart developing

Set up your development environment

Get familiar with the Stripe CLI and our server-side SDKs.

Not a developer?

Check out our no-code docs, use a pre-built solution from our partner directory, or hire a Stripe-certified expert.

Stripe’s server-side SDKs and command-line interface (CLI) allow you to interact with Stripe’s REST APIs. Start with the Stripe CLI to streamline your development environment and make API calls.

Use the SDKs to avoid writing boilerplate code. To start sending requests from your environment, choose a language to follow a quickstart guide.

Chrome extensions

We recommend you build your payment integration with Stripe (such as Elements or Checkout) on your own website. Then, set up your Chrome extension to send users to this payment page when they’re ready to complete a purchase.

This method is more secure and easier to maintain than trying to handle payments directly within the extension.

In this quickstart, you install the Stripe CLI – an essential tool that gets you command line access to your Stripe integration. You also install the Stripe Node.js server-side SDK to get access to Stripe APIs from applications written in Node.js.

What you learn

In this quickstart, you’ll learn:

  • How to call Stripe APIs without writing a line of code
  • How to manage third-party dependencies using the npm or yarn package manager
  • How to install the latest Stripe Node SDK v19.0.0
  • How to send your first SDK request

Initial setup

First, create a Stripe account or sign in.

Set up the Stripe CLI

Install

From the command-line, use an install script or download and extract a versioned archive file for your operating system to install the CLI.

Authenticate

Log in and authenticate your Stripe user account to generate a set of restricted keys. To learn more, see Stripe CLI keys and permissions.

Press the Enter key on your keyboard to complete the authentication process in your browser.

Confirm setup

Now that you’ve installed the CLI, you can make a single API request to Create a product.

Look for the product identifier (in id) in the response object. Save it for the next step.

If everything worked, the command-line displays the following response.

Next, call Create a price to attach a price of 30 USD. Swap the placeholder in product with your product identifier (for example, prod_LTenIrmp8Q67sa).

If everything worked, the command-line displays the following response.

Install the Node.js server-side SDK

The latest version of the Stripe Node.js server-side SDK is v19.0.0. It supports Node.js versions 12+.

Check your Node version:

Initialize Node

Install the library

Install the library with npm, a package manager for Node:

After you install the library with npm, the library is automatically added as a dependency in your project’s package.json file. For example:

Installation alternatives

Yarn – You can install the library with yarn, another package manager for Node:

Run your first SDK request

Now that you have the Node.js SDK installed, you can create a subscription Product and attach a Price with a couple of API requests. The Node.js SDK returns promises which can be used as chainable callbacks. To demonstrate, we’re passing the product identifier returned in the Product response to create a Price in this example.

Note

This sample uses the default keys of your Stripe user account for your sandbox environment. Only you can see these values.

Save the file as create_price.js. From the command line, cd to the directory containing the file you just saved and run:

If everything worked, the command line shows the following response. Save these identifiers so you can use them while building your integration.

See also

This wraps up the quickstart. See the links below for a few different ways to process a payment for the product you just created.

  • Create a payment link
  • Pre-built checkout page
  • Custom payment flow
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc