---
title: "Stripe チェックアウトセッションを作成する（Web / IDトークンのみ）"
method: POST
path: "/api/v1/billing/checkout"
tags: ["billing"]
---

# Stripe チェックアウトセッションを作成する（Web / IDトークンのみ）

`POST /api/v1/billing/checkout`

## Request

- Base URL: `https://app.yukkurigen.com`
- URL: `https://app.yukkurigen.com/api/v1/billing/checkout`
- Auth: HTTP bearer

## Request body

- object
  - `priceKey` string, required
  - `successUrl` string, uri, required: app.yukkurigen.com のURL
  - `cancelUrl` string, uri, required: app.yukkurigen.com のURL

## Response `200`

チェックアウトURL

- object
  - `url` string, uri
  - `sessionId` string

## Other responses

- `400`: リクエスト不正（code: validation_error）
- `401`: 未認証
- `409`: すでに有料プランの購読がある（code: already_subscribed、manageUrl 同梱）。プラン変更はカスタマーポータル（POST /api/v1/billing/portal）で
- `503`: その商品が現在購入できない（code: price_unavailable）

---

[API](https://skmtc.dev/yukkurigen/apis/yukkurigen-ai-operated-api.md) · [All operations](https://skmtc.dev/yukkurigen/apis/yukkurigen-ai-operated-api/llms.txt) · [OpenAPI document](https://skmtc.dev/yukkurigen/apis/yukkurigen-ai-operated-api/revisions/ba5f36b016da?raw)
