Find an API

Search public APIs with auth details & Postman guides

← All APIs

Stripe API

Stripe · Company

Company Basic Auth Payments Finance E-commerce

Accept payments, manage customers, subscriptions, invoices, and refunds. Industry-standard payments API with excellent test mode — no real money needed to explore.

Authentication

Basic Auth Use your Stripe secret key as the HTTP Basic Auth username with an empty password. In Postman this is entered as a Bearer token or Basic auth. Always use test mode keys (prefix sk_test_) for development.

Sample Requests

GET List customers

Returns a list of your Stripe customers. Use test mode key to see test data.

https://api.stripe.com/v1/customers?limit=5

Hover any highlighted part to learn what it does

curl -X GET "https://api.stripe.com/v1/customers?limit=5" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS"
import requests
params = {
    "limit": "5"
}
headers = {
    "Authorization": "Basic YOUR_BASE64_CREDENTIALS"
}
response = requests.get(
    "https://api.stripe.com/v1/customers",
    params=params,
    headers=headers,
)
print(response.json())
const url = new URL('https://api.stripe.com/v1/customers');
url.searchParams.set('limit', '5');

const response = await fetch(url, {
  headers: {
    'Authorization': 'Basic YOUR_BASE64_CREDENTIALS'
  },
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.stripe.com/v1/customers")
	q := baseURL.Query()
	q.Set("limit", "5")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)
	req.Header.Set("Authorization", "Basic YOUR_BASE64_CREDENTIALS")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.stripe.com/v1/customers")
uri.query = URI.encode_www_form({
  "limit" => "5"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Basic YOUR_BASE64_CREDENTIALS"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.stripe.com/v1/customers?" . http_build_query([
    "limit" => "5"
]);
$opts = ["http" => [
    "method" => "GET",
    "header" => implode("\r\n", [
        "Authorization: Basic YOUR_BASE64_CREDENTIALS"
    ]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
POST Create a test customer

Creates a new customer record in your Stripe account.

https://api.stripe.com/v1/customers

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
Content-Type application/x-www-form-urlencoded
curl -X POST "https://api.stripe.com/v1/customers" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "Authorization: Basic YOUR_BASE64_CREDENTIALS"
import requests
headers = {
    "Content-Type": "application/x-www-form-urlencoded",
    "Authorization": "Basic YOUR_BASE64_CREDENTIALS"
}
response = requests.post(
    "https://api.stripe.com/v1/customers",
    headers=headers,
)
print(response.json())
const url = 'https://api.stripe.com/v1/customers';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'Basic YOUR_BASE64_CREDENTIALS'
  },
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	targetURL := "https://api.stripe.com/v1/customers"
	req, _ := http.NewRequest("POST", targetURL, nil)
	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	req.Header.Set("Authorization", "Basic YOUR_BASE64_CREDENTIALS")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.stripe.com/v1/customers")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)
req["Content-Type"] = "application/x-www-form-urlencoded"
req["Authorization"] = "Basic YOUR_BASE64_CREDENTIALS"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.stripe.com/v1/customers";
$opts = ["http" => [
    "method" => "POST",
    "header" => implode("\r\n", [
        "Content-Type: application/x-www-form-urlencoded",
        "Authorization: Basic YOUR_BASE64_CREDENTIALS"
    ]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. Sign up at stripe.com — test mode is available immediately, no business verification needed
  2. Get your test secret key from Dashboard → Developers → API keys (starts with sk_test_)
  3. In Postman, go to the Authorization tab and select Basic Auth
  4. Set Username = your sk_test_ key, leave Password blank
  5. Create a GET request to https://api.stripe.com/v1/customers?limit=5 and send
  6. Tip: store your key as a Postman variable {{stripe_test_key}} — never use live keys (sk_live_) in Postman

What can you build with Stripe API?

Stripe API is a Company API. Developers commonly use company APIs for:

  • enriching CRM records with company firmographics
  • building lead-generation and prospecting tools
  • verifying business identity and registration details
  • monitoring competitors and market intelligence
  • powering B2B data enrichment pipelines

Basic authentication. Send your username and password (Base64-encoded) in the Authorization header. Always use HTTPS — Basic auth over plain HTTP exposes your credentials.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗