Stripe
Add shared Stripe test keys to your project.
npx extraorbital add stripeTest mode only. Everyone using these keys can read or delete the same data. Do not store private information.
- 01 / Run the commandGet the service
- 02 / Read your .envUse its credentials
- 03 / Connect your appCall the SDK or API
Limits
| Limit | Free · Prototype | Paid |
|---|---|---|
| Payments | Test mode only | Test mode only |
| Data isolation | Shared account | Shared account |
| Data retention | May be cleared at any time | May 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.
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 },
});const mine = await stripe.customers.search({
query: `metadata['app']:'${MINE}'`,
});Environment variables
The CLI writes these to .env or an existing .env.local.
| Variable | Purpose |
|---|---|
STRIPE_SECRET_KEY | Private test key |
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY | Public test key for browser code |
STRIPE_WEBHOOK_SECRET | Webhook signing secret, only if a shared endpoint is configured |
Specifics
Options
npx extraorbital add stripe [--slug <name>]| Flag | Default | Description |
|---|---|---|
--slug | default | A 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:
npx extraorbital remove stripeSet 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
| Usage | All plans |
|---|---|
| Requests | Stripe's own test-mode limits |
| Spend | None — test mode moves no money |
See pricing for team subscription fees, allowances, and billing terms. Plans and billing ↗