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

# Create an AI Action package

> Creates a package of AI Actions. Packages are charged as one-off payments, so unlike plans and add-ons they are not mirrored into the Stripe catalog.



## OpenAPI

````yaml /openapi/platform.json post /platform/api/v1/billing/credit_packages
openapi: 3.1.0
info:
  title: WiseApp API — Plataforma
  description: >-
    Referência completa da API do WiseApp: plataforma (provisionamento),
    aplicação (conta), cliente (canais públicos) e MCP.
  version: 1.1.0
servers:
  - url: https://chat.wiseapp360.com
    description: Sua instalação WiseApp
security: []
paths:
  /platform/api/v1/billing/credit_packages:
    post:
      tags:
        - Billing Administration
      summary: Create an AI Action package
      description: >-
        Creates a package of AI Actions. Packages are charged as one-off
        payments, so unlike plans and add-ons they are not mirrored into the
        Stripe catalog.
      operationId: create-billing-catalog-credit-package
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/billing_admin_credit_package_payload'
            example:
              credit_package:
                name: 5k AI Actions
                ai_actions: 5000
                validity_days: 180
                position: 1
                active: true
                prices:
                  - currency: USD
                    amount_cents: 4000
                  - currency: BRL
                    amount_cents: 20000
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/billing_admin_credit_package_payload'
            example:
              credit_package:
                name: 5k AI Actions
                ai_actions: 5000
                validity_days: 180
                position: 1
                active: true
                prices:
                  - currency: USD
                    amount_cents: 4000
                  - currency: BRL
                    amount_cents: 20000
      responses:
        '201':
          description: Package created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/billing_admin_credit_package'
              example:
                id: 2
                name: 5k AI Actions
                ai_actions: 5000
                validity_days: 180
                position: 1
                active: true
                prices:
                  - id: 4
                    currency: USD
                    amount_cents: 4000
                  - id: 5
                    currency: BRL
                    amount_cents: 20000
                created_at: '2026-03-04T11:00:00Z'
                updated_at: '2026-07-22T08:31:09Z'
        '401':
          description: Unauthorized. The token is not a valid platform app token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request_error'
              example:
                error: Unauthorized
        '404':
          description: >-
            Native billing is not enabled on this installation, or the record
            was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request_error'
              example:
                error: Resource not found
        '422':
          description: >-
            The package or one of its prices is invalid, returned with the code
            `invalid_record`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/billing_error'
              example:
                message: Validation failed
                attributes:
                  - name cannot be blank
      security:
        - platformAppApiKey: []
components:
  schemas:
    billing_admin_credit_package_payload:
      type: object
      required:
        - credit_package
      properties:
        credit_package:
          type: object
          description: >-
            Attributes to set. `prices` always replaces the whole price table: a
            currency missing from the list is deleted.
          properties:
            name:
              type: string
            ai_actions:
              type: integer
              minimum: 1
            validity_days:
              type: integer
              minimum: 1
            position:
              type: integer
            active:
              type: boolean
            prices:
              type: array
              items:
                $ref: '#/components/schemas/billing_admin_package_price'
      example:
        credit_package:
          name: 5k AI Actions
          ai_actions: 5000
          validity_days: 180
          position: 1
          active: true
          prices:
            - currency: USD
              amount_cents: 4000
            - currency: BRL
              amount_cents: 20000
    billing_admin_credit_package:
      type: object
      description: A one-off package of AI Actions.
      properties:
        id:
          type: integer
        name:
          type: string
        ai_actions:
          type: integer
          description: AI Actions granted when the package is paid.
        validity_days:
          type: integer
          description: Days until the granted credits expire.
        position:
          type: integer
        active:
          type: boolean
        prices:
          type: array
          items:
            $ref: '#/components/schemas/billing_admin_package_price'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      example:
        id: 2
        name: 5k AI Actions
        ai_actions: 5000
        validity_days: 180
        position: 1
        active: true
        prices:
          - id: 4
            currency: USD
            amount_cents: 4000
          - id: 5
            currency: BRL
            amount_cents: 20000
        created_at: '2026-03-04T11:00:00Z'
        updated_at: '2026-07-22T08:31:09Z'
    bad_request_error:
      title: data
      type: object
      properties:
        description:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/request_error'
    billing_error:
      type: object
      description: >-
        A billing error, with a stable machine-readable code next to the
        translated message.
      properties:
        error:
          type: string
          description: Message already translated to the locale of the account.
        code:
          type: string
          enum:
            - addon_not_available
            - addon_max_exceeded
            - invalid_quantity
            - billing_profile_required
            - provider_action_unavailable
            - price_unavailable
            - gateway_unavailable
            - subscription_required
            - cancellation_not_scheduled
            - payment_refused
            - invalid_profile
            - gateway_error
            - invalid_record
            - invalid_source
            - invalid_date
            - parameter_missing
      example:
        error: An active subscription is required.
        code: subscription_required
    billing_admin_package_price:
      type: object
      required:
        - currency
        - amount_cents
      description: Price of an AI Action package. One-off charges have no billing interval.
      properties:
        id:
          type: integer
          description: Only present in responses.
        currency:
          type: string
          example: USD
        amount_cents:
          type: integer
      example:
        id: 4
        currency: USD
        amount_cents: 1000
    request_error:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
        code:
          type: string
  securitySchemes:
    platformAppApiKey:
      type: apiKey
      in: header
      name: api_access_token
      description: >-
        Token de um Platform App, gerado pelo super admin. Usado para
        provisionar contas, usuários, papéis e bots.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.