Skip to content

Billing

Tenant plan and billing information. This endpoint allows the tenant to view their current plan and limits. Requires manager role or above.

Important

Payment and subscription management is handled internally by the Avanter team, which integrates with the Asaas payment gateway. Tenants do not interact with the payment gateway directly.

Endpoints

MethodEndpointDescriptionMinimum Role
GET/api/v1/billing/planCurrent plan informationmanager

Get Plan

Returns information about the current plan, resource limits, and current usage for the tenant. This is a read-only endpoint.

GET /api/v1/billing/plan

Request Example

bash
curl -X GET https://voki.avanter.com.br/api/v1/billing/plan \
  -H "Authorization: Bearer eyJhbGci..." \
  -H "X-Tenant: avanter"

Success Response (200)

json
{
  "data": {
    "plan": "professional",
    "status": "active",
    "max_concurrent_calls": 10,
    "max_users": 50,
    "max_departments": 20,
    "recording_enabled": true,
    "transcription_enabled": true,
    "analytics_enabled": true,
    "current_period_start": "2026-02-01T00:00:00Z",
    "current_period_end": "2026-03-01T00:00:00Z",
    "usage": {
      "active_users": 12,
      "active_departments": 5,
      "calls_this_month": 342,
      "recording_storage_mb": 2048
    }
  }
}

Available Plans

PlanPrice (BRL)Concurrent CallsUsersDepartmentsRecordingTranscriptionAnalytics
free0121NoNoBasic
basic993103YesNoBasic
advanced39952510YesYesFull
professional699105020YesYesFull
enterpriseCustomUnlimitedUnlimitedUnlimitedYesYesFull

Billing Flow

Billing in Voki is managed internally by the Avanter team:

  1. Tenant registration: The tenant registers via /api/signup/register selecting a plan.
  2. Payment creation: The Avanter team creates the payment in Asaas through the internal panel.
  3. Automatic confirmation: Asaas sends a webhook to POST /api/webhooks/asaas when the payment is confirmed.
  4. Subscription activation: The tenant's subscription status is updated automatically.

Asaas Webhook

The POST /api/webhooks/asaas endpoint is public (no JWT authentication) but protected by Asaas token validation. Processed events include:

  • PAYMENT_CONFIRMED - Payment confirmed
  • PAYMENT_RECEIVED - Payment received
  • PAYMENT_OVERDUE - Payment overdue
  • PAYMENT_REFUNDED - Payment refunded

Signup

The signup flow for new tenants uses public endpoints:

Validate Document

POST /api/signup/validate-document

Checks whether a CPF/CNPJ is valid and not already in use.

bash
curl -X POST https://voki.avanter.com.br/api/signup/validate-document \
  -H "Content-Type: application/json" \
  -d '{
    "document": "12.345.678/0001-90",
    "document_type": "cnpj"
  }'

Register Tenant

POST /api/signup/register

Creates the tenant and administrator user. The selected plan remains pending until payment is confirmed by the Avanter team via Asaas.

bash
curl -X POST https://voki.avanter.com.br/api/signup/register \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "New Company",
    "document": "12.345.678/0001-90",
    "document_type": "cnpj",
    "admin_name": "Admin",
    "admin_email": "admin@newcompany.com",
    "admin_password": "securePassword123",
    "plan": "professional"
  }'

Documentação da API Voki v4.0