---
title: "決済リンクを発行する（create_checkout）"
method: POST
path: "/api/v1/billing/checkout-link"
tags: ["billing"]
---

# 決済リンクを発行する（create_checkout）

`POST /api/v1/billing/checkout-link`

## Request

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

## Request body

- object
  - `priceKey` 'standard' | 'pro' | 'enterprise' | 'lifetime_ymm4' | 'credit_pack_50' | 'credit_pack_150' | 'credit_pack_500', required: 402 応答の purchase.priceKey をそのまま渡す。これ以外（販売を止めた旧レンダーパック render_pack_* を含む）は 400 validation_error で、本文の allowedPriceKeys に受け付ける値が入る
  - `successUrl` string: 省略可。渡す場合は app.yukkurigen.com のURL
  - `cancelUrl` string: 省略可

## Response `200`

決済リンクを作成した

- object
  - `url` string, nullable: 利用者に渡す購入ページ
  - `sessionId` string: 状態確認に使う
  - `priceKey` string
  - `nextStep` string

## Other responses

- `400`: priceKey が不正（code: validation_error）
- `401`: 未認証（code: unauthenticated）
- `403`: 権限不足（credits:read）
- `409`: すでに有料プランの購読がある（code: already_subscribed）。2本目の購読は二重請求になるため受け付けない。プランの変更・解約は manageUrl（請求ページ）からカスタマーポータルで利用者本人が行う
- `429`: レート制限（code: rate_limited）
- `503`: その商品が現在購入できない（code: price_unavailable）

## Changes

- **2026-10-20** `ba5f36b016da`: 30 warning, 18 info
  - added the new `already_subscribed` enum value to the `code` response property for the response status `400`
  - added the new `already_subscribed` enum value to the `code` response property for the response status `401`
  - added the new `already_subscribed` enum value to the `code` response property for the response status `403`
  - added the new `already_subscribed` enum value to the `code` response property for the response status `409`
  - …44 more

[Operation history](https://skmtc.dev/yukkurigen/apis/yukkurigen-ai-operated-api/changes/api/v1/billing/checkout-link/post.md)

---

[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)
