API reference

Billing

Plans, Razorpay checkout, usage meters, invoices, add-ons, and trial status. All amounts are INR unless noted.

Signup starts a 14-day trial (no card). When the trial ends, the workspace is moved onto the Free plan with limited quotas — contacts, campaigns, and sessions stay. Upgrade from the dashboard or these APIs anytime.

Trial, Free, and paid plans

GET /api/trial/status shows remaining trial time. GET /api/billing/subscription is the source of truth for plan slug, period dates, and whether you are trialing. Usage is also at GET /api/billing/usage and GET /api/usage.

  • Public: GET /api/billing/plans and GET /api/billing/addons (no auth).
  • Checkout: POST /api/billing/checkout then complete Razorpay on the client and POST /api/billing/verify-payment.
  • Upgrade takes effect immediately (prorated). Downgrade applies at the next cycle.
  • Add-ons (extra numbers, seats, white-label) attach without changing the base plan.
GET/api/billing/plans

List plans

Public catalog of subscription plans (no auth required).

URL: https://api.actiwapi.com/api/billing/plans

Auth: None

Code examples

curl -X GET "https://api.actiwapi.com/api/billing/plans" \
  -H "Content-Type: application/json"

Response example200

{
  "success": true,
  "data": [{
    "slug": "growth",
    "name": "Growth",
    "priceCents": 99900,
    "currency": "INR",
    "maxSessions": 5
  }]
}

Try in Swagger UI

GET/api/billing/subscription

Get subscription

Current subscription status, plan, and trial information.

URL: https://api.actiwapi.com/api/billing/subscription

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonYes*

Code examples

curl -X GET "https://api.actiwapi.com/api/billing/subscription" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"

Response example200

{
  "success": true,
  "data": {
    "status": "active",
    "plan": { "slug": "growth", "name": "Growth" },
    "currentPeriodEnd": "2026-06-30T00:00:00.000Z"
  }
}

Try in Swagger UI

GET/api/billing/usage

Get usage

Usage meters against plan limits.

URL: https://api.actiwapi.com/api/billing/usage

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonYes*

Code examples

curl -X GET "https://api.actiwapi.com/api/billing/usage" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"

Response example200

{
  "success": true,
  "data": {
    "sessions": { "used": 2, "limit": 5 },
    "apiRequests": { "used": 0, "limit": 100000 }
  }
}

Try in Swagger UI

POST/api/billing/checkout

Create checkout

Create a Razorpay order for plan upgrade or new subscription.

URL: https://api.actiwapi.com/api/billing/checkout

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonYes*

Request example

{ "planSlug": "growth" }

Code examples

curl -X POST "https://api.actiwapi.com/api/billing/checkout" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"
  -d '{ "planSlug": "growth" }'

Response example200

{
  "success": true,
  "data": {
    "orderId": "order_xxx",
    "amount": 99900,
    "currency": "INR",
    "keyId": "rzp_test_xxx"
  }
}

Try in Swagger UI

POST/api/billing/verify-payment

Verify payment

Verify Razorpay payment signature after client-side checkout.

URL: https://api.actiwapi.com/api/billing/verify-payment

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonYes*

Request example

{
  "razorpay_order_id": "order_xxx",
  "razorpay_payment_id": "pay_xxx",
  "razorpay_signature": "signature_xxx"
}

Code examples

curl -X POST "https://api.actiwapi.com/api/billing/verify-payment" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"
  -d '{  "razorpay_order_id": "order_xxx",  "razorpay_payment_id": "pay_xxx",  "razorpay_signature": "signature_xxx"}'

Response example200

{ "success": true, "message": "Payment verified" }

Try in Swagger UI

POST/api/billing/cancel

Cancel subscription

Cancel auto-renewal at end of billing period.

URL: https://api.actiwapi.com/api/billing/cancel

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonYes*

Code examples

curl -X POST "https://api.actiwapi.com/api/billing/cancel" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"

Response example200

{ "success": true, "data": { "cancelAtPeriodEnd": true } }

Try in Swagger UI

GET/api/trial/status

Trial status

Remaining trial time for the workspace (JWT required).

URL: https://api.actiwapi.com/api/trial/status

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonYes*

Code examples

curl -X GET "https://api.actiwapi.com/api/trial/status" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"

Response example200

{
  "success": true,
  "data": { "isTrialing": true, "trialEndsAt": "2026-09-10T00:00:00.000Z" }
}

Try in Swagger UI

GET/api/billing/invoices

List invoices

Razorpay invoices for the workspace.

URL: https://api.actiwapi.com/api/billing/invoices

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonYes*

Code examples

curl -X GET "https://api.actiwapi.com/api/billing/invoices" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"

Response example200

{
  "success": true,
  "data": [{ "id": "uuid", "amountCents": 99900, "currency": "INR", "status": "paid" }]
}

Try in Swagger UI

POST/api/billing/upgrade

Upgrade plan

Move to a higher plan. Takes effect immediately with proration when applicable.

URL: https://api.actiwapi.com/api/billing/upgrade

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonYes*

Request example

{ "planSlug": "business" }

Code examples

curl -X POST "https://api.actiwapi.com/api/billing/upgrade" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"
  -d '{ "planSlug": "business" }'

Response example200

{ "success": true, "data": { "plan": { "slug": "business" } } }

Try in Swagger UI

GET/api/billing/addons

List add-ons

Public add-on catalog (extra numbers, seats, white-label).

URL: https://api.actiwapi.com/api/billing/addons

Auth: None

Code examples

curl -X GET "https://api.actiwapi.com/api/billing/addons" \
  -H "Content-Type: application/json"

Response example200

{
  "success": true,
  "data": [{ "slug": "extra_session", "name": "Extra WhatsApp session", "priceCents": 19900 }]
}

Try in Swagger UI

Error codes

Failed requests return a JSON envelope with success: false and a human-readable message.

{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "phone": "Valid phone number is required"
  }
}
HTTPCodeDescription
400VALIDATION_ERRORRequest body or query failed validation.
401UNAUTHORIZEDMissing or invalid JWT / API key.
403FORBIDDENAuthenticated but lacking permission or entitlement.
403SUBSCRIPTION_INACTIVEAction not allowed on the current plan (including Free after trial). Upgrade or wait for entitlements.
403LIMIT_EXCEEDEDPlan limit reached (sessions, messages, API requests, etc.).
404NOT_FOUNDResource does not exist or is not in your account.
409CONFLICTDuplicate resource or invalid state transition.
429RATE_LIMITEDToo many requests; retry after backoff.
500INTERNAL_ERRORUnexpected server error.
502WHATSAPP_UNAVAILABLEWhatsApp session disconnected or provider error.