Sign in
Create account
Sign in
Home
Payments
Business operations
Financial services
Developer tools
Security
All products
Home
Payments
Business operations
Home
Payments
Business operations
Financial services
Developer tools
Support
Overview
Quickstart
Stripe CLI
Stripe for Visual Studio Code
Webhooks
File uploads
Error handling
Error codes
API
Keys
Libraries
Upgrades
Rate limits
Card testing
Expanding responses
Domains and IP addresses
Building With Stripe
Stripe.js and Elements
Prebuilt iOS UI
Prebuilt Android UI
Extensions
Plugins
Samples
Checklist
HomeDeveloper tools

Development quickstart

Get up and running with our client libraries and start developing your Stripe integration.

Not a developer?

Hire a Stripe certified expert or use a prebuilt solution created by one of our verified partners (no code required).

Integrating Stripe into your app or website can begin as soon as you create a Stripe account, and requires three steps:

  1. Obtain your API keys so Stripe can authenticate your integration’s API requests
  2. Install a client library so your integration can interact with the Stripe API
  3. Make a test API request to confirm everything is up and running

Obtain your API keys

Stripe authenticates your API requests using your account’s API keys. If you don’t include your key when making an API request, or use one that is incorrect or outdated, Stripe returns an error.

Every account has two pairs of keys: one for testing and one for running live transactions. All API requests exist in either test or live mode, and objects—customers, prices, coupons, and so forth—in one mode can’t be manipulated by objects in the other.

Your API keys are always available in the Dashboard. For your convenience, your test API keys for your account are:

Key Value
Publishablepk_test_TYooMQauvdEDq54NiTphI7jx
Secretsk_test_4eC39HqLyjWDarjtT1zdp7dc

Stripe automatically populates code examples in our documentation with your test API keys while you’re logged in—only you can see these values.

Use only your test API keys for testing and development. This ensures that you don’t accidentally modify your live customers or charges.

If you can’t see your secret API keys in the Dashboard, this means you don’t have access to them. Contact your Stripe account’s owner and ask to be added to their team as a developer.

Install a client library

We provide official libraries for different programming languages and mobile platforms.

Terminal
# Available as a gem sudo gem install stripe
Gemfile
# If you use bundler, you can add this line to your Gemfile gem 'stripe'

iOS SDK

The iOS SDK is open source, fully documented, and compatible with apps supporting iOS 11 or above.

  1. If you haven’t already, install the latest version of CocoaPods.
  2. If you don’t have an existing Podfile, run the following command to create one:
    Terminal
    pod init
  3. Add this line to your Podfile:
    Podfile
    pod 'Stripe'
  4. Run the following command:
    Terminal
    pod install
  5. Don’t forget to use the .xcworkspace file to open your project in Xcode, instead of the .xcodeproj file, from here on out.
  6. In the future, to update to the latest version of the SDK, just run:
    Terminal
    pod update Stripe

For details on the latest SDK release and past versions, see the Releases page on GitHub. To receive notifications when a new release is published, watch releases for the repository.

When your app starts, configure the SDK with your Stripe publishable key so that it can make requests to the Stripe API.

AppDelegate.swift
import UIKit import Stripe @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { StripeAPI.defaultPublishableKey =
"pk_test_TYooMQauvdEDq54NiTphI7jx"
// do any other necessary launch configuration return true } }

Use your test mode keys while you test and develop, and your live mode keys before you publish your app.

Android SDK

The Android SDK is open source and fully documented.

To install the SDK, add stripe-android to the dependencies block of your app/build.gradle file:

apply plugin: 'com.android.application' android { ... } dependencies { // ... // Stripe Android SDK implementation 'com.stripe:stripe-android:16.4.0' }

For details on the latest SDK release and past versions, see the Releases page on GitHub. To receive notifications when a new release is published, watch releases for the repository.

Configure the SDK with your Stripe publishable key so that it can make requests to the Stripe API, such as in your Application subclass:

import com.stripe.android.PaymentConfiguration class MyApp : Application() { override fun onCreate() { super.onCreate() PaymentConfiguration.init( applicationContext,
"pk_test_TYooMQauvdEDq54NiTphI7jx"
) } }

Use your test mode keys while you test and develop, and your live mode keys before you publish your app.

There are also many third-party libraries created by the Stripe community so you can use a language we don’t officially support.

Make a test API request

To check that your integration is working correctly, make a test API request using your test secret key to create a PaymentIntent. We’ve pre-filled this code example with your test secret API key—only you can see this value.

Terminal
curl https://api.stripe.com/v1/payment_intents \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d amount=1000 \ -d currency=usd \ -d "payment_method_types[]"=card \ -d receipt_email="jenny.rosen@example.com"

Stripe returns a PaymentIntent object in response to your API request.

{ "id": "pi_1DRuHnHgsMRlo4MtwuIAUe6u", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, "amount_received": 0, "application": null, "application_fee_amount": null, "canceled_at": null, "cancellation_reason": null,

After you successfully make an API request, you’re ready to begin integrating Stripe.

See also

  • Payments Overview
  • Billing Overview
  • Connect Overview
Was this page helpful?
Questions? Contact us.
Developer tutorials on YouTube.
You can unsubscribe at any time. Read our privacy policy.
On this page
Obtain your API keys
Install a client library
Make a test API request
See also