Skip to content

Commit a68fbbe

Browse files
sampolahtinenclaudeankur-arch
authored
feat(blog): add Prisma Postgres on Stripe Projects post (#7946)
* feat(blog): add Prisma Postgres on Stripe Projects post Draft skeleton + first prose pass for the Stripe Projects integration: add a Prisma Postgres database from the Stripe CLI, manage plans, and the upcoming Prisma Compute teaser. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(blog): revise Prisma Postgres on Stripe Projects post - Rewrite intro around the agent paid-provisioning gap and SPTs - Add real CLI output, file tree, plans table, and SPT sequence diagram - Rename env vars to PRISMA_DATABASE_URL (direct) / PRISMA_ACCELERATE_URL - Document vault (Secret Store + encrypted local copy, gitignored) - Correct Prisma Compute wording and link the public-beta launch post - Remove em dashes per house style; mask credentials; use example@prisma.io - Brighten mermaid edge labels via muted color; add Sampo author avatar Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(blog): drop link expiry detail, keep single-use Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Update apps/blog/content/blog/prisma-postgres-on-stripe-projects/index.mdx * Update apps/blog/content/blog/prisma-postgres-on-stripe-projects/index.mdx * Update apps/blog/content/blog/prisma-postgres-on-stripe-projects/index.mdx * Update apps/blog/content/blog/prisma-postgres-on-stripe-projects/index.mdx * feat(blog): add hero and meta images for Stripe Projects post Adds the Prisma | Stripe branded hero image (3600x1890) referenced by the post frontmatter at imgs/hero.png and imgs/meta.png. The 1.905:1 ratio matches the hero convention and the ideal OG image ratio. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(blog): use option 1 title for Stripe Projects post * Update apps/blog/content/blog/prisma-postgres-on-stripe-projects/index.mdx --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com>
1 parent 29f9f7b commit a68fbbe

5 files changed

Lines changed: 200 additions & 0 deletions

File tree

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
---
2+
title: "Your agent can now provision Prisma Postgres through Stripe"
3+
slug: "prisma-postgres-on-stripe-projects"
4+
date: "2026-06-26"
5+
authors:
6+
- "Sampo Lahtinen"
7+
metaTitle: "Prisma Postgres on Stripe Projects"
8+
metaDescription: "Add a Prisma Postgres database to your Stripe project with one command: spending limits out of the box, plan changes from the CLI you already use."
9+
heroImagePath: "/prisma-postgres-on-stripe-projects/imgs/hero.png"
10+
heroImageAlt: "Prisma Postgres on Stripe Projects"
11+
metaImagePath: "/prisma-postgres-on-stripe-projects/imgs/meta.png"
12+
tags:
13+
- "announcement"
14+
- "prisma-postgres"
15+
---
16+
17+
If your billing already runs through Stripe, you don't need a new vendor relationship to get a production Postgres database. [Stripe Projects](https://docs.stripe.com/projects?utm_source=prisma) lets you add [Prisma Postgres](https://www.prisma.io/docs/postgres) to your project with one command. Because the whole flow runs in your terminal, you can let your agent do it.
18+
19+
## Why this exists
20+
21+
Coding agents have gotten good at building software but they can't provision the paid infrastructure that software needs: a database, a host, anything with a card behind it. That's the wall every agentic workflow hits: it can write the app, but it has to stop and wait for a human to go sign up, verify an email, and enter a credit card.
22+
23+
Stripe Projects is Stripe's answer to that wall. It's their entry into the agent-tooling race, with a distinct angle: instead of just helping agents _make_ things, it lets them _pay_ for them, safely, through a new primitive called Shared Payment Tokens (SPTs). Run `stripe projects init` and Stripe scaffolds a project for your agent: skills, a readme, and commands, plus a vault that fills with secrets as you add services. That's the starting point.
24+
25+
Prisma Postgres is now a provider on it. Which means an agent can go from "I need a database" to a live connection string without a human in the loop, and without a second vendor relationship, since the payment and identity you already have with Stripe carry over. And soon, full applications too, via Prisma Compute. More on that below.
26+
27+
## Getting started
28+
29+
From your project directory, set up Stripe Projects:
30+
31+
```bash
32+
stripe projects init
33+
```
34+
35+
```text
36+
βœ“ Authenticated with Stripe
37+
38+
Project demo
39+
Account Prisma Testing
40+
Email example@prisma.io βœ“ Verified
41+
Providers βœ“ Prisma
42+
43+
βœ“ Created .projects/
44+
βœ“ Created .agents/skills/stripe-projects-cli/
45+
βœ“ Created .claude/skills/stripe-projects-cli
46+
βœ“ Created .cursor/rules/
47+
βœ“ Created AGENTS.md
48+
βœ“ Created CLAUDE.md
49+
50+
Your project is ready.
51+
```
52+
53+
That leaves a small scaffold in your repo, the workspace your agent operates in:
54+
55+
```text
56+
.
57+
β”œβ”€β”€ .agents/skills/stripe-projects-cli/SKILL.md
58+
β”œβ”€β”€ .claude/skills/stripe-projects-cli β†’ ../../.agents/skills/stripe-projects-cli
59+
β”œβ”€β”€ .cursor/rules/stripe-projects-cli.mdc
60+
β”œβ”€β”€ .projects/
61+
β”‚ β”œβ”€β”€ cache/catalog.json # cached catalog of providers and plans
62+
β”‚ β”œβ”€β”€ state.json
63+
β”‚ └── state.local.json
64+
β”œβ”€β”€ AGENTS.md
65+
└── CLAUDE.md
66+
```
67+
68+
The skills and editor rules (`.agents`, `.claude`, `.cursor`) are what teach your coding agent to drive Stripe Projects; `.projects/` holds local state. Then add a database, the step you'll usually just hand to your agent:
69+
70+
```bash
71+
stripe projects add prisma/database
72+
```
73+
74+
```text
75+
βœ“ Prisma already linked (example@prisma.io)
76+
βœ“ Setting up prisma/free...
77+
βœ“ Provisioning prisma/database...
78+
βœ“ Resource provisioned
79+
βœ“ Credentials synced
80+
βœ“ Project updated
81+
82+
● prisma/database ready
83+
βœ“ Injected 4 environment variables
84+
~ Modified .projects/vault/vault.json
85+
~ Modified .env
86+
βœ“ 4 credentials created for Prisma:
87+
PRISMA_DATABASE_URL=postβ€’β€’β€’β€’β€’β€’β€’β€’
88+
PRISMA_ACCELERATE_URL=prisβ€’β€’β€’β€’β€’β€’β€’β€’
89+
PRISMA_DATABASE_ID=cmqβ€’β€’β€’β€’β€’β€’β€’β€’
90+
PRISMA_REGION=usβ€’β€’β€’β€’β€’β€’β€’β€’
91+
```
92+
93+
Your `.env` now has everything you need to connect:
94+
95+
```bash
96+
PRISMA_DATABASE_URL="postgres://β€’β€’β€’β€’β€’β€’β€’β€’" # direct connection
97+
PRISMA_ACCELERATE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=β€’β€’β€’β€’β€’β€’β€’β€’" # pooled, via Prisma Accelerate
98+
PRISMA_DATABASE_ID=cmqβ€’β€’β€’β€’β€’β€’β€’β€’
99+
PRISMA_REGION=us-east-1
100+
```
101+
102+
Those credentials live in two places: the canonical copy stays server-side in [Stripe's Secret Store](https://docs.stripe.com/stripe-apps/store-secrets), and locally Stripe Projects keeps an **encrypted** copy in the project vault (`.projects/vault/vault.json`), with your `.env` as the plaintext output for local dev. Both the vault and `.env` are `600`-permissioned and git-ignored by `stripe projects init`, so neither is ever committed. To onboard a teammate you don't pass secrets around: they run `stripe projects env --pull` and fetch their own from the Secret Store.
103+
104+
Notice what _didn't_ happen: no browser opened, no signup form, no credit card. Because you have a Stripe business account, your email is already KYC-verified and tied to a real person, so we create or link your Prisma account right in the CLI (here, `βœ“ Prisma already linked`). If you don't have a Prisma account yet, we create a claimable one from that email; if you already do, we link it and never touch your existing workspaces. Either way we spin up a new dedicated workspace for the link, and if a teammate on the same Stripe account adds Prisma too, we add them to that workspace automatically, no invites to manage.
105+
106+
## Spending limits, the Stripe way
107+
108+
This is where SPTs earn their keep. An SPT is a payment credential, backed by a real payment method like a card, that carries a spending limit _you_ set. The first time you upgrade a plan, your agent will ask you to confirm a payment method and create one for you, backed by that method. You instantiate the underlying method through Stripe's UI (the flow hands you a link), and from there you set a monthly limit, either per provider or a single global cap across everything in your project.
109+
110+
Here's the shape of it: your agent issues the token, hands it to the seller, and Stripe settles the charge against your limit.
111+
112+
```mermaid
113+
sequenceDiagram
114+
participant Customer
115+
participant Agent
116+
participant Stripe
117+
participant Seller as Seller (Prisma)
118+
Customer->>Agent: Submits payment method
119+
Agent->>Stripe: Issues SharedPaymentToken
120+
Agent->>Seller: Sends SharedPaymentToken
121+
Seller->>Stripe: Creates PaymentIntent with SharedPaymentToken
122+
Stripe->>Customer: Processes transaction
123+
```
124+
125+
The payoff: cost control isn't something each provider implements on its own, leaving you to find out it didn't work when the invoice shows up. The limit lives with Stripe and is enforced at the token, and it covers everything billed against it: both the plan subscription and any usage overages on top of it. If a plan upgrade costs more than your limit allows, it's rejected before anything changes. And as usage runs through the cycle, overage charges count against the same cap, so your total spend can't quietly climb past the number you set.
126+
127+
## Managing your plan
128+
129+
There are four plans and you can see them any time with `stripe projects catalog prisma`:
130+
131+
| Plan | Price | Included per billing cycle | Overages |
132+
| ---------- | ------- | ----------------------------------- | ------------------ |
133+
| `free` | Free | 100k queries, 0.5 GiB-month storage | None (hard limits) |
134+
| `starter` | $10/mo | 1M queries, 10 GiB-month storage | Metered |
135+
| `pro` | $49/mo | 10M queries, 50 GiB-month storage | Metered |
136+
| `business` | $129/mo | 50M queries, 100 GiB-month storage | Metered |
137+
138+
When the free tier gets tight, upgrade from the same CLI, or ask your agent to:
139+
140+
```bash
141+
# Upgrade to the Pro plan
142+
stripe projects upgrade prisma-plan pro
143+
# βœ“ Plan price checked against your SPT spending limit first
144+
# βœ“ Workspace subscription created, billed through Stripe
145+
# βœ“ Plan applies immediately
146+
```
147+
148+
Upgrades are immediate and before you are charged, the plan price is checked against your SPT spending limit. If it doesn't cover the price, the upgrade is rejected and nothing changes. Because the new plan takes effect right away, Stripe bills a prorated amount for the rest of the current cycle on the spot, then the full price from the next one. The plan applies to your whole Stripe Projects workspace, so every database you've added shares it.
149+
150+
Downgrading is the same command pointed at a smaller plan:
151+
152+
```bash
153+
# Downgrade back to the free plan
154+
stripe projects upgrade prisma-plan free
155+
# βœ“ Plan changed immediately
156+
```
157+
158+
Plan changes through Stripe Projects are immediate in both directions: downgrades take effect right away, not at the end of your billing cycle, just like upgrades.
159+
160+
## Day-to-day
161+
162+
Two commands cover most of what you'll reach for:
163+
164+
```bash
165+
# Where do I stand?
166+
stripe projects status
167+
168+
# Take me to my project in the Prisma Console
169+
stripe projects open prisma
170+
```
171+
172+
`status` shows what's provisioned and on which plan. `open` mints a single-use link that drops you straight into your workspace dashboard in the Prisma Console, already authenticated as the right account. If you're signed into the Console as someone else, it tells you instead of silently mixing accounts. You never _have_ to open the Console, but it's there when you want it.
173+
174+
## Cleaning up
175+
176+
Tearing down is just as direct:
177+
178+
```bash
179+
# Remove the database
180+
stripe projects remove prisma-database
181+
# βœ“ Database deprovisioned immediately, access credentials invalidated
182+
# βœ— Your plan is NOT changed. Downgrade separately if you want that
183+
184+
# Disconnect Prisma from this project entirely
185+
stripe projects unlink prisma
186+
```
187+
188+
Removing a database and changing your plan are deliberately decoupled: deleting a database never silently touches your billing. If you're removing your last database and want to stop paying, downgrade the plan too:
189+
190+
```bash
191+
stripe projects upgrade prisma-plan free
192+
```
193+
194+
## What's next
195+
196+
The database is the first piece. [Prisma Compute](https://www.prisma.io/blog/launching-prisma-compute-public-beta), our TypeScript app hosting that runs on the same infrastructure as your database without sending traffic through a separate hosting vendor, recently launched in public beta and is coming to Stripe Projects next. Once it lands, the same flow gets you a deployed app right next to that database: describe an idea to your agent, and it stands up a running app with a permanent URL and a database already wired in. Then hand that URL to a colleague to try, comment on, and build on with you, all without leaving the CLI you started from. Quick revenue dashboard, internal tool, throwaway demo: it's a prompt away.
197+
198+
If your billing already lives in Stripe, try it: `stripe projects add prisma/database` and you're a connection string away from a real Postgres database, with a spending limit you set before we could ever bill you.
290 KB
Loading
2.48 MB
Loading
2.48 MB
Loading

β€Žapps/blog/src/components/Mermaid.tsxβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export function Mermaid({ chart }: { chart: string }) {
55
const svg = renderMermaidSVG(chart, {
66
bg: 'var(--color-fd-background)',
77
fg: 'var(--color-fd-foreground)',
8+
// Edge/message labels default to a too-dim bg/fg mix; use the theme's muted-foreground for a softer, legible gray.
9+
muted: 'var(--color-fd-muted-foreground)',
810
transparent: true,
911
interactive: false,
1012
});

0 commit comments

Comments
Β (0)