---
title: "Create Checkout Session"
method: POST
path: "/api/checkout"
---

# Create Checkout Session

`POST /api/checkout`

Create Stripe checkout session for metered billing subscription

Args:
    request: Checkout request data
    current_user: Authenticated user
    db: Database session
    
Returns:
    CheckoutResponse with Stripe checkout URL

## Request body

- CreateCheckoutRequest — Request schema for creating checkout session
  - `appUserId` string, required
  - `customerEmail` string, required
  - `priceId` string, nullable
  - `successUrl` string, required
  - `cancelUrl` string, required

## Response `200`

Successful Response

- CheckoutResponse — Response schema for checkout session
  - `url` string, required
  - `sessionId` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/latted/apis/motion-graphics-designer-api.md) · [All operations](https://skmtc.dev/latted/apis/motion-graphics-designer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/latted/motion-graphics-designer-api/revisions/36d149b525df/schema)
