---
title: "Billing Checkout"
method: POST
path: "/api/billing/checkout"
---

# Billing Checkout

`POST /api/billing/checkout`

## Request

- Base URL: `https://api.animgen.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.animgen.com/api/billing/checkout`
- Auth: none declared

## Request body

- BillingCheckoutRequest
  - `kind` 'subscription' | 'topup_pack', required
  - `planCode` 'basic' | 'expert' | 'ultra', nullable
  - `packCode` 'small' | 'medium' | 'large', nullable
  - `analyticsContext` BillingAnalyticsContext
    - `entryPoint` 'locked_export_format' | 'export_upgrade_cta' | 'insufficient_credits' | 'insufficient_generation_credits' | 'insufficient_export_credits' | 'api_subscription_required' | 'storage_quota' | 'account_balance' | 'commercial_use' | 'marketing' | 'navigation' | 'other', required
    - `desiredFormat` 'clip_video' | 'webm_alpha' | 'prores_4444' | 'gif' | 'frames_zip' | 'spritesheet' | 'spritesheet_bundle' | 'spritesheet_json' | 'unity_meta' | 'unity_pack' | 'godot_pack' | 'unreal_paper2d_pack' | 'cocos_creator_pack' | 'construct3_pack', nullable
    - `sourceJobId` string, uuid, nullable
    - `sourceAssetId` string, uuid, nullable
    - `flow` 'quick' | 'advanced' | 'api', nullable
  - `purchaseIntent` BillingPurchaseIntent
    - `intentId` string, uuid, required
    - `entryPoint` 'locked_export_format' | 'export_upgrade_cta' | 'insufficient_credits' | 'insufficient_generation_credits' | 'insufficient_export_credits' | 'api_subscription_required' | 'storage_quota' | 'account_balance' | 'commercial_use' | 'marketing' | 'navigation' | 'other', required
    - `resumeAction` 'open_export' | 'continue_generation' | 'continue_export' | 'open_developer' | 'open_account' | 'open_pricing' | 'none'
    - `returnPath` string
    - `desiredFormat` 'clip_video' | 'webm_alpha' | 'prores_4444' | 'gif' | 'frames_zip' | 'spritesheet' | 'spritesheet_bundle' | 'spritesheet_json' | 'unity_meta' | 'unity_pack' | 'godot_pack' | 'unreal_paper2d_pack' | 'cocos_creator_pack' | 'construct3_pack', nullable
    - `sourceJobId` string, uuid, nullable
    - `sourceAssetId` string, uuid, nullable
    - `workspaceId` string, uuid, nullable
    - `compositionId` string, uuid, nullable
    - `flow` 'quick' | 'advanced' | 'api', nullable
    - `requiredCredits` integer, nullable
    - `availableCredits` integer, nullable
    - `shortageCredits` integer, nullable

## Response `200`

Successful Response

- BillingOrderOut
  - `orderId` string, uuid, required
  - `orderType` string, required
  - `productCode` string, required
  - `billingPeriod` string, nullable
  - `amount` string, required
  - `currency` string, required
  - `status` string, required
  - `provider` string, required
  - `providerRef` string, nullable
  - `checkoutUrl` string, nullable
  - `manualContactEmail` string, nullable
  - `manualMessage` string, nullable
  - `purchaseIntent` BillingPurchaseIntent
    - `intentId` string, uuid, required
    - `entryPoint` 'locked_export_format' | 'export_upgrade_cta' | 'insufficient_credits' | 'insufficient_generation_credits' | 'insufficient_export_credits' | 'api_subscription_required' | 'storage_quota' | 'account_balance' | 'commercial_use' | 'marketing' | 'navigation' | 'other', required
    - `resumeAction` 'open_export' | 'continue_generation' | 'continue_export' | 'open_developer' | 'open_account' | 'open_pricing' | 'none'
    - `returnPath` string
    - `desiredFormat` 'clip_video' | 'webm_alpha' | 'prores_4444' | 'gif' | 'frames_zip' | 'spritesheet' | 'spritesheet_bundle' | 'spritesheet_json' | 'unity_meta' | 'unity_pack' | 'godot_pack' | 'unreal_paper2d_pack' | 'cocos_creator_pack' | 'construct3_pack', nullable
    - `sourceJobId` string, uuid, nullable
    - `sourceAssetId` string, uuid, nullable
    - `workspaceId` string, uuid, nullable
    - `compositionId` string, uuid, nullable
    - `flow` 'quick' | 'advanced' | 'api', nullable
    - `requiredCredits` integer, nullable
    - `availableCredits` integer, nullable
    - `shortageCredits` integer, nullable
  - `createdAt` string, required
  - `paidAt` string, nullable
  - `fulfilledAt` string, nullable
  - `cancelledAt` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/animgen/apis/aianimgenbackend.md) · [All operations](https://skmtc.dev/animgen/apis/aianimgenbackend/llms.txt) · [OpenAPI document](https://skmtc.dev/animgen/apis/aianimgenbackend/revisions/ac3744fbb14e?raw)
