---
title: "Idempotently ensures a plan exists (create-if-absent) for test scenarios. Unlike create-plan, when the plan already exists this returns it WITHOUT re-running the Stripe price sync/archive sweep. Used by specs that need a STABLE, reusable plan (e.g. welcome-paywall) whose Stripe price is synced once and reused — eliminating the create-then-checkout price-sync race. POST /account/test/playwright/ensure-plan Headers: x-playwright-api-key: <your-api-key> Body: { appDomain: string, key: string, name?: string, trial?: boolean, trialDays?: number, prices?: Price[] } Returns: { planId, key, name, created }"
method: POST
path: "/v1/account/test/playwright/ensure-plan"
tags: ["account"]
---

# Idempotently ensures a plan exists (create-if-absent) for test scenarios. Unlike create-plan, when the plan already exists this returns it WITHOUT re-running the Stripe price sync/archive sweep. Used by specs that need a STABLE, reusable plan (e.g. welcome-paywall) whose Stripe price is synced once and reused — eliminating the create-then-checkout price-sync race. POST /account/test/playwright/ensure-plan Headers: x-playwright-api-key: <your-api-key> Body: { appDomain: string, key: string, name?: string, trial?: boolean, trialDays?: number, prices?: Price\[\] } Returns: { planId, key, name, created }

`POST /v1/account/test/playwright/ensure-plan`

## Request

- Base URL: `https://api.thebridge.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.thebridge.dev/v1/account/test/playwright/ensure-plan`
- Auth: none declared

## Request body

- CreatePlanRequestDto

## Response `201`

---

[API](https://skmtc.dev/thebridge/apis/bridge-api.md) · [All operations](https://skmtc.dev/thebridge/apis/bridge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thebridge/apis/bridge-api/revisions/290fffcb3d80?raw)
