Provision Stripe Product, Payment Link & Local Checkout Gate
postbuild_checkoutProvision a Stripe Product, USD price, and hosted Payment Link, then write PostbuildCheckoutGate.jsx to the project so you can add checkout and monetization.
Instructions
Provision a Stripe Product, USD Price, and hosted Payment Link (https://buy.stripe.com/...) via STRIPE_SECRET_KEY and write .postbuild/PostbuildCheckoutGate.jsx into cwd. When product_name or description are omitted, metadata is inferred by scraping url; interval switches Price creation between one-time (one_time) and recurring (month/year) billing, while allow_live gates sk_live_ keys (test keys sk_test_ run immediately, whereas live keys abort with LIVE_CONFIRMATION_REQUIRED before any Stripe API call or file write unless the user explicitly requested a live product). Each invocation creates a fresh Stripe Product/Price/Payment Link and overwrites only .postbuild/PostbuildCheckoutGate.jsx. Use this tool when adding Stripe monetization to a project; do not use it to check whether a live site already has checkout (postbuild_scan) or to generate SEO/llms.txt assets (postbuild_fix).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "postbuild_checkout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Local repository root where `.postbuild/PostbuildCheckoutGate.jsx` is written (defaults to `process.cwd()`). | |
| url | Yes | Target project URL used for success/cancel redirects and fallback product metadata (e.g. 'https://your-app.com'). | |
| interval | No | Billing cadence: 'one_time' for a single charge, or 'month'/'year' for recurring subscriptions (default: 'one_time'). | one_time |
| price_usd | No | Price in whole USD (default: 29, minimum: 1). | |
| allow_live | No | Explicit confirmation to create live Stripe objects when `STRIPE_SECRET_KEY` is an `sk_live_` key (default: false). | |
| description | No | Custom Stripe Product description displayed on the hosted Stripe Checkout page. | |
| product_name | No | Custom Stripe Product name (defaults to the target site's title + 'Launch Pass'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the Stripe Payment Link and local JSX gate component were created. | |
| mode | Yes | Stripe environment mode used ('test' for sk_test_ keys, 'live' for sk_live_ keys). | |
| priceId | Yes | Created Stripe Price ID (`price_...`). | |
| productId | Yes | Created Stripe Product ID (`prod_...`). | |
| checkoutUrl | Yes | Hosted Stripe Payment Link URL (`https://buy.stripe.com/...`). | |
| gateFilePath | Yes | Absolute path to the generated `.postbuild/PostbuildCheckoutGate.jsx` file. | |
| paymentLinkId | Yes | Created Stripe Payment Link ID (`plink_...`). |