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

# Configure a billing provider

> Stores the complete Stripe or Chargebee configuration used to bill downstream customers for the selected reseller or partner account. Each request replaces the current provider configuration. Supply every required field with its original value; redacted values returned by GET cannot be reused.



## OpenAPI

````yaml post /api/v2/billing/billingSystemConfig
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
tags:
  - name: Agents
  - name: Inbound Email
    description: Control which senders may create inbound email work for an Agent.
  - name: Features
    description: Inspect capabilities available within an account hierarchy.
  - name: Conversation Logs
    description: Query conversation activity and calculate account-level metrics.
  - name: Computer Agents
    description: Set up, configure, inspect, and manage Vida Computer Agents.
  - name: Computer Agent Sessions
    description: View and reset Computer Agent sessions.
  - name: Accounts
  - name: Agent Templates
    description: Create, manage, and apply reusable Agent configurations.
paths:
  /api/v2/billing/billingSystemConfig:
    post:
      tags:
        - Billing
      summary: Configure a billing provider
      description: >-
        Stores the complete Stripe or Chargebee configuration used to bill
        downstream customers for the selected reseller or partner account. Each
        request replaces the current provider configuration. Supply every
        required field with its original value; redacted values returned by GET
        cannot be reused.
      parameters:
        - name: targetAccountId
          in: query
          description: >-
            Reseller or partner account whose billing provider configuration
            should be replaced.
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - title: Stripe billing provider
                  type: object
                  required:
                    - billingSystemType
                    - apiKey
                    - publishableKey
                    - webhookSigningKey
                  properties:
                    billingSystemType:
                      type: string
                      enum:
                        - stripe
                      example: stripe
                    apiKey:
                      type: string
                      description: Stripe secret API key.
                      example: <stripe-secret-key>
                    publishableKey:
                      type: string
                      description: Stripe publishable key used for customer checkout.
                      example: <stripe-publishable-key>
                    webhookSigningKey:
                      type: string
                      description: >-
                        Signing secret for the reseller-specific Vida webhook
                        endpoint.
                      example: <stripe-webhook-signing-secret>
                - title: Chargebee billing provider
                  type: object
                  required:
                    - billingSystemType
                    - apiKey
                    - publishableKey
                    - site
                    - webhookUsername
                    - webhookPassword
                  properties:
                    billingSystemType:
                      type: string
                      enum:
                        - chargebee
                      example: chargebee
                    apiKey:
                      type: string
                      description: Chargebee full-access API key.
                      example: <chargebee-api-key>
                    publishableKey:
                      type: string
                      description: Chargebee publishable key used for customer checkout.
                      example: <chargebee-publishable-key>
                    site:
                      type: string
                      description: Chargebee site subdomain without chargebee.com.
                      example: acme
                    webhookUsername:
                      type: string
                      description: >-
                        Username configured for Chargebee webhook basic
                        authentication.
                      example: <chargebee-webhook-username>
                    webhookPassword:
                      type: string
                      description: >-
                        Password configured for Chargebee webhook basic
                        authentication.
                      example: <chargebee-webhook-password>
      responses:
        '200':
          description: Billing provider configuration stored successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Success
        '400':
          description: Bad Request
        '401':
          description: Authentication is required.
        '403':
          description: The requester cannot manage billing for the selected account.
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````