Skip to content
extraorbital
Documentation ExtraOrbital
Browse documentation

Application services

Stripe

Add shared Stripe test keys to your project.

Run in your project folder
npx extraorbital add stripe

Test mode only. Everyone using these keys can read or delete the same data. Do not store private information.

  1. 01 / Run the commandGet the service
  2. 02 / Read your .envUse its credentials
  3. 03 / Connect your appCall the SDK or API

Limits

LimitFree · PrototypePaid
PaymentsTest mode onlyTest mode only
Data isolationShared accountShared account
Data retentionMay be cleared at any timeMay be cleared at any time

Use your own Stripe account for private data and real payments.

Use it

Add your app ID to metadata so you can find your test records. This does not provide isolation.

checkout.ts
import Stripe from "stripe";

const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
const MINE = "acme-demo";

const customer = await stripe.customers.create({
  email: "buyer@example.com",
  // Yours to find again on an account that is not only yours.
  metadata: { app: MINE },
});

const intent = await stripe.paymentIntents.create({
  amount: 1999,
  currency: "usd",
  customer: customer.id,
  metadata: { app: MINE },
});
customers.ts
const mine = await stripe.customers.search({
  query: `metadata['app']:'${MINE}'`,
});

Environment variables

The CLI writes these to .env or an existing .env.local.

VariablePurpose
STRIPE_SECRET_KEYPrivate test key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYPublic test key for browser code
STRIPE_WEBHOOK_SECRETWebhook signing secret, only if a shared endpoint is configured

Specifics

Options

Terminal
npx extraorbital add stripe [--slug <name>]
FlagDefaultDescription
--slugdefaultA second copy of the same keys, tracked separately

A second slug tracks the same shared keys. It does not create another account.

Shared data

Other projects can read or delete your records. Webhook events may belong to other apps. Filter by your app identifier before acting. The account can be cleared at any time.

Webhooks

For local forwarding, verify with the signing secret printed by stripe listen. The supplied STRIPE_WEBHOOK_SECRET is present only when a shared endpoint exists.

Your own account

Remove the shared resource before supplying your own keys:

Terminal
npx extraorbital remove stripe

Set STRIPE_SECRET_KEY and NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY to your own credentials in .env.

Switch before accepting payments or storing any data that must remain private or persistent.

Pricing

UsageAll plans
RequestsStripe's own test-mode limits
SpendNone — test mode moves no money

See pricing for team subscription fees, allowances, and billing terms. Plans and billing ↗