---
title: "Setup Billing"
method: POST
path: "/api/billing/setup"
---

# Setup Billing

`POST /api/billing/setup`

Setup billing for a user - creates Stripe customer, RevenueCat user, and checkout session

Args:
    request: Billing setup request with redirect URLs
    current_user: Authenticated user
    db: Database session
    
Returns:
    BillingSetupResponse with customer ID and checkout URL

## Request body

- BillingSetupRequest — Request schema for billing setup
  - `successUrl` string, required
  - `cancelUrl` string, required

## Response `200`

Successful Response

- BillingSetupResponse — Response schema for billing setup
  - `success` boolean
  - `customerId` string, required
  - `checkoutUrl` string, required
  - `checkoutSessionId` 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)
