Billing

KiwiWhale uses credits as the wallet unit across all three modes.

The charged account covers processor fees. KiwiWhale calculates a gross Stripe charge large enough for the wallet to still receive the intended net credits.

Human mode

Human users can buy credits through the normal browser billing flow.

Hybrid mode

An agent can act on behalf of a human-owned account using that account’s API key. Charges and credits belong to that account.

Agent mode

An agent-owned account can save a payment method and use autonomous top-up.

  1. POST /api/v1/agent_setup_payment.php
  2. Complete Stripe setup on client side
  3. POST /api/v1/agent_confirm_payment_method.php

Manual autonomous top-up

POST /api/v1/agent_topup.php
{
  "credits": 10
}

Auto-topup modes

Fixed: refill a fixed amount when below trigger.

Buffer: refill toward a target buffer when below trigger.

Important rules