> ## Documentation Index
> Fetch the complete documentation index at: https://docs.puffle.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Start hosted billing checkout

> Start hosted billing checkout

**CLI:**

```bash theme={null}
puffle billing checkout create --plan-id <plan-id> --return-surface <return-surface> --idempotency-key <idempotency-key>
```

## Overview

Start hosted billing checkout

This page documents `post /api/billing/checkout`. Use the request and response sections on this page for accepted parameters, payload fields, response fields, and authentication behavior.

## AI agent notes

* Confirm the operation matches the user's intent before calling it.
* For write operations, confirm the user intends to change state.
* Surface validation, permission, and not-found errors instead of retrying unchanged.


## OpenAPI

````yaml post /api/billing/checkout
openapi: 3.0.3
info:
  title: Puffle API
  version: 1.0.0
  description: >-
    HTTP API for the Puffle GTM platform - Feed and Lead Finder search
    preparation, campaign-backed Outbound execution, Puffle Agent runs, sender
    management, and Unibox reply workflows. Designed for operation by both
    humans and autonomous AI agents. Agents should start at the [Agent
    Playbook](/guides/agent-playbook) which prescribes a workspace-context check
    (`GET /api/context`) and core user journeys with exact call ordering.
  contact:
    name: Puffle Support
    url: https://puffle.ai
servers:
  - url: https://app.puffle.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Campaigns
    description: >-
      Campaign-backed Outbound execution. These endpoints manage draft,
      launching, active, paused, and completed Outbound runs with sequence
      nodes, contacts, and sender accounts.
  - name: Accounts
    description: Signed-in user account, settings, and workspace context endpoints.
  - name: Billing
    description: Billing customer portal and account billing endpoints.
  - name: Senders
    description: >-
      Connected sender accounts, email inboxes, sending domains, DNS
      verification, warmup, and sender capacity.
  - name: Socials
    description: >-
      Read connected LinkedIn and X accounts, review current and archived posts,
      and reconcile publication status. Creating, editing, scheduling,
      publishing, OAuth connection, analytics, and mentions remain
      dashboard-managed workflows and are not part of the public Bearer-token
      API.
paths:
  /api/billing/checkout:
    post:
      tags:
        - Billing
      summary: Start hosted billing checkout
      description: Start hosted billing checkout
      operationId: billing.checkout
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                planId:
                  type: string
                  enum:
                    - starter
                    - pro
                returnSurface:
                  type: string
                  enum:
                    - onboarding
                    - billing
                idempotencyKey:
                  type: string
                  format: uuid
              required:
                - planId
                - returnSurface
                - idempotencyKey
              additionalProperties: false
      responses:
        '200':
          description: Hosted checkout
          content:
            application/json:
              schema:
                type: object
                properties:
                  checkout:
                    type: object
                    properties:
                      url:
                        type: string
                        format: uri
                      expiresAt:
                        type: string
                        format: date-time
                        nullable: true
                    required:
                      - url
                      - expiresAt
                    additionalProperties: false
                  replayed:
                    type: boolean
                required:
                  - checkout
                  - replayed
                additionalProperties: false
        '400':
          description: Invalid checkout request
        '409':
          description: Paid access, in-progress checkout, or idempotency conflict
        '502':
          description: Billing checkout rejected
        '503':
          description: Billing provider unavailable
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pk_live_...

````