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

# Setup Subscription Payment Method

> Start a Stripe setup-mode checkout to save a payment method for the



## OpenAPI

````yaml post /subscriptions/subscriptions/{id}/setup-payment-method/
openapi: 3.1.0
info:
  title: Cekura API
  version: v1
  description: >-
    Complete API documentation for the Cekura platform. This API provides
    endpoints for testing, observing, and evaluating AI voice agents — including
    managing agents, running evaluators, defining metrics, and analyzing call
    quality.
servers:
  - url: https://api.cekura.ai
security: []
paths:
  /subscriptions/subscriptions/{id}/setup-payment-method/:
    post:
      tags:
        - subscriptions
      description: >-
        Start a Stripe setup-mode checkout to save a payment method for the

        organization. Used by plans without a Stripe subscription (e.g. the free

        pay-as-you-go plan) before top-ups, auto-refill, or adding paid members.

        The checkout.session.completed webhook makes the card the customer
        default.
      operationId: subscriptions-subscriptions-setup-payment-method-create
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Subscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Subscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Subscription'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
          description: ''
      security:
        - api_key: []
components:
  schemas:
    Subscription:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        organization:
          type:
            - integer
            - 'null'
          readOnly: true
        stripe_subscription_id:
          type: string
          readOnly: true
        is_active:
          type: boolean
          readOnly: true
        is_trial:
          type: string
          readOnly: true
        pack:
          allOf:
            - $ref: '#/components/schemas/PackInline'
          readOnly: true
        next_billing_cost:
          type: string
          readOnly: true
        has_payment_method:
          type: string
          readOnly: true
        seat_payment_overdue_since:
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
          description: >-
            When a renewal payment for this perpetual plan's seat subscription
            first failed. Once older than SUBSCRIPTION_GRACE_PERIOD_DAYS,
            billable members other than the free-plan owner are blocked at the
            API level until the payment is fixed. Cleared when a seat invoice is
            paid.
        last_payment_at:
          type: string
          format: date-time
          readOnly: true
        expire_at:
          type: string
          format: date-time
          readOnly: true
        cancelled_at:
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
          description: >-
            Timestamp when the subscription was cancelled (is_active set to
            False).
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
    PackInline:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 100
        code:
          type: string
          maxLength: 100
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
        balance:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
        subscription_overage:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
          description: >-
            Price per credit for overage/extra purchases. Set to -1 to disallow
            purchasing extra credits.
        billing_type:
          enum:
            - subscription
            - self_serve
          type: string
          x-spec-enum-id: 31820255025544ce
          description: |-
            Billing type for the pack

            * `subscription` - Subscription
            * `self_serve` - Self Serve
        interval:
          enum:
            - month
            - quarter
            - year
          type: string
          description: |-
            * `month` - Monthly
            * `quarter` - Quarterly
            * `year` - Yearly
          x-spec-enum-id: 493dc6126f399b59
        max_members_limit:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        max_concurrent_runs_limit:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        max_concurrent_chat_runs_limit:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        allow_cancellation:
          type: boolean
          description: Allow users to cancel subscription
        allow_view_only_role:
          type: boolean
          description: >-
            Allow VIEW_ONLY role for memberships/invites on this pack. When
            False, view-only seats are blocked.
        data_retention_days:
          type:
            - integer
            - 'null'
          maximum: 2147483647
          minimum: -2147483648
          description: >-
            Data retention period in days. Leave blank to skip archival for this
            plan.
        extra_member_price:
          type: string
          readOnly: true
        free_members_count:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: >-
            Number of members included for free (e.g. 1 = first user free).
            <b>Only applies to self-serve billing.</b> Self-serve packs with
            free members never expire: the base plan is free and only the seats
            beyond this count are billed through Stripe.
        one_time_credits:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          description: >-
            One-time complimentary credits granted when the pack is provisioned.
            Added to the never-expiring extra balance; they do not recur.
      required:
        - price
  securitySchemes:
    api_key:
      type: apiKey
      name: X-CEKURA-API-KEY
      in: header
      description: >-
        API Key Authentication. It should be included in the header of each
        request.

````