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

# Ensure WABA funding

> Verifies an external multi-partner solution account with Meta and ensures Kapso funding
for it, without waiting for the Meta association webhook. Use it after Embedded Signup
completes.

Your project must have exactly one active **external** multi-partner solution; you
cannot select a solution or project, set the WABA currency, or supply a token. When the
membership is unknown, Kapso reads the WABA through that solution and verifies its owning
portfolio before recording the association. Financial setup then runs in the background.

`202` means a funding run is pending or running - it is **not** confirmation that the
account is funded. Poll `GET /whatsapp/accounts/{waba_id}/funding` until the run reaches
a terminal state and the funding `status` is `funded`. `200` is returned when the account
is already funded or when no new run was started.

Idempotent on desired state, with no `Idempotency-Key`: repeated calls reuse an
in-progress run, and a terminal run is returned during a 30 second cooldown. After the
cooldown a new run is started. The endpoint never resumes an explicitly disabled
portfolio, a removed membership, or a revoked attachment - those stay explicit
workflows.




## OpenAPI

````yaml /api/platform/v1/openapi-platform.yaml post /whatsapp/accounts/{waba_id}/funding
openapi: 3.1.0
info:
  title: Kapso Platform API
  version: 0.2.0
  description: >
    Build WhatsApp messaging into your product. Manage customers, connect phone
    numbers, send broadcasts, and handle conversations.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Manage customer accounts
  - name: Setup Links
    description: WhatsApp onboarding via embedded signup
  - name: Phone Numbers
    description: Connect and manage WhatsApp numbers
  - name: Webhooks
    description: Subscribe to WhatsApp events
  - name: Display Names
    description: Update WhatsApp business display names
  - name: Broadcasts
    description: |
      Send template messages at scale

      **Alpha**: This API is in alpha and subject to change
  - name: Conversations
    description: Manage conversation state
  - name: Media
    description: Upload media files for WhatsApp messaging
  - name: Users
    description: Manage project team members
  - name: Inbox Embeds
    description: Create and manage embeddable inbox access links
  - name: Webhook Deliveries
    description: View webhook delivery attempts and their status
  - name: External API Logs
    description: View logs of external API calls made by the project
  - name: Log Search
    description: Search log events across API, Meta, workflow, and webhook sources
  - name: Events
    description: Emit and query project-scoped events
  - name: Provider Models
    description: List available AI provider models
  - name: WhatsApp Flows
    description: Build interactive WhatsApp Flows for surveys and forms
  - name: Contacts
    description: Manage WhatsApp contacts
  - name: Findings
    description: Detect recurring problems in conversations and investigate them with AI
  - name: Notifications
    description: >-
      Route project alerts to shared inboxes and Slack channels connected from
      the Kapso app
  - name: WhatsApp Funding
    description: >-
      Read Kapso funding status and recorded messaging and calling usage, and
      stop portfolio funding
paths:
  /whatsapp/accounts/{waba_id}/funding:
    post:
      tags:
        - WhatsApp Funding
      summary: Ensure WABA funding
      description: >
        Verifies an external multi-partner solution account with Meta and
        ensures Kapso funding

        for it, without waiting for the Meta association webhook. Use it after
        Embedded Signup

        completes.


        Your project must have exactly one active **external** multi-partner
        solution; you

        cannot select a solution or project, set the WABA currency, or supply a
        token. When the

        membership is unknown, Kapso reads the WABA through that solution and
        verifies its owning

        portfolio before recording the association. Financial setup then runs in
        the background.


        `202` means a funding run is pending or running - it is **not**
        confirmation that the

        account is funded. Poll `GET /whatsapp/accounts/{waba_id}/funding` until
        the run reaches

        a terminal state and the funding `status` is `funded`. `200` is returned
        when the account

        is already funded or when no new run was started.


        Idempotent on desired state, with no `Idempotency-Key`: repeated calls
        reuse an

        in-progress run, and a terminal run is returned during a 30 second
        cooldown. After the

        cooldown a new run is started. The endpoint never resumes an explicitly
        disabled

        portfolio, a removed membership, or a revoked attachment - those stay
        explicit

        workflows.
      operationId: ensureWhatsappAccountFunding
      parameters:
        - name: waba_id
          in: path
          required: true
          description: Meta WhatsApp Business Account ID.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsappEnsureFundingRequest'
      responses:
        '200':
          description: Already funded, or no new run was started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappFundingResponse'
        '202':
          description: A funding run is pending or running
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappFundingResponse'
              example:
                data:
                  waba_id: '109537945127015'
                  business_portfolio_id: '823380597459265'
                  status: not_funded
                  reason: null
                  message: Kapso funding is not active.
                  currency: USD
                  waba_currency: USD
                  last_verified_at: null
                  last_checked_at: null
                  paid_messages:
                    paused: false
                    reasons: []
                  operation:
                    id: ad0d68c2-3a0d-43d9-aa41-d7bd1bc6792b
                    status: pending
                    started_at: '2026-09-15T01:00:00Z'
                    finished_at: null
                    error_kind: null
                    meta_error_code: null
        '400':
          description: Missing or invalid `waba_id` or `business_portfolio_id`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '409':
          description: >
            Conflicting state: no single active external solution, funding
            disabled for the

            portfolio, the WABA belongs to another portfolio, project or
            solution, Meta did not

            confirm the association, or the membership or attachment was removed
            and must be

            reconnected explicitly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Meta could not verify account access. No local records are created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  error_kind:
                    type: string
                    nullable: true
                  meta_error_code:
                    type: integer
                    nullable: true
                  meta_trace_id:
                    type: string
                    nullable: true
              example:
                error: >-
                  Meta could not verify account access. Retry later or contact
                  support.
                error_kind: meta_unavailable
                meta_error_code: null
                meta_trace_id: null
        '503':
          description: Contention or queue unavailable. Retry the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    WhatsappEnsureFundingRequest:
      type: object
      required:
        - business_portfolio_id
      properties:
        business_portfolio_id:
          type: string
          description: Meta Business Portfolio ID that owns the WABA. Digits only.
          example: '823380597459265'
    WhatsappFundingResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/WhatsappFunding'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    WhatsappFunding:
      type: object
      required:
        - waba_id
        - business_portfolio_id
        - status
        - reason
        - message
        - currency
        - waba_currency
        - last_verified_at
        - last_checked_at
        - paid_messages
        - operation
      properties:
        waba_id:
          type: string
          description: Meta WhatsApp Business Account ID.
          example: '4188880514714289'
        business_portfolio_id:
          type: string
          nullable: true
          description: Meta Business Portfolio ID that owns the WABA.
          example: '1991231921410797'
        status:
          type: string
          description: >
            Funding state derived from locally persisted evidence.


            - `funded`: funding is verified, the allocation is approved and
            observed funding IDs match.

            - `pending`: an initial funding operation is in progress.

            - `unknown`: previously verified, but current evidence cannot
            confirm funding.

            - `not_funded`: funding was never verified, including an attempt
            retired because the customer kept their existing Meta payment
            method.

            - `revoked`: Meta allocation evidence confirms the funding was
            deleted.
          enum:
            - funded
            - pending
            - unknown
            - not_funded
            - revoked
        reason:
          type: string
          nullable: true
          description: >-
            Machine-readable reason, `null` when `status` is `funded`. Treat as
            an extensible string; new values can be added.
          example: existing_payment_method
        message:
          type: string
          description: Display copy for `reason`. Do not parse.
          example: Existing Meta payment method kept.
        currency:
          type: string
          description: Kapso settlement currency.
          example: USD
        waba_currency:
          type: string
          nullable: true
          description: >-
            Funding snapshot currency, or the observed WABA currency when no
            funding attachment exists.
          example: USD
        last_verified_at:
          type: string
          format: date-time
          nullable: true
          description: Latest recorded transition into verified funding.
        last_checked_at:
          type: string
          format: date-time
          nullable: true
          description: Last funding check, including failed attempts.
        paid_messages:
          type: object
          description: >-
            Local billing pauses on this project's funding attachment. Not an
            authorization promise - balance, credentials and Meta restrictions
            can still block sending.
          required:
            - paused
            - reasons
          properties:
            paused:
              type: boolean
            reasons:
              type: array
              items:
                type: string
        operation:
          $ref: '#/components/schemas/WhatsappFundingRun'
    WhatsappFundingRun:
      type: object
      nullable: true
      description: >-
        Latest funding run for this WABA in your project, or `null` when no run
        was ever started. A terminal run does not promise funding - read
        `status` on the funding object as well.
      required:
        - id
        - status
        - started_at
        - finished_at
        - error_kind
        - meta_error_code
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - pending
            - running
            - succeeded
            - failed
            - cancelled
            - expired
        started_at:
          type: string
          format: date-time
        finished_at:
          type: string
          format: date-time
          nullable: true
        error_kind:
          type: string
          nullable: true
          description: >-
            Machine-readable failure class of the run. Treat as an extensible
            string. No provider messages or credentials are included.
        meta_error_code:
          type: integer
          nullable: true
          description: Meta error code recorded for the failed run, when one was returned.
  responses:
    UnauthorizedError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````