How Citipen Works

Last updated: 2026-05-19

Citipen is operated by TAK Trading Co., Ltd. (Tax ID 3600668919, Dong Nai, Vietnam). This page describes the end-to-end workflow from sign-up to receiving an AI-generated result, so you understand exactly what happens behind each click.

1. Sign-up & account provisioning

  1. You sign up through Clerk (Google or email).
  2. Citipen automatically creates a corresponding user record in the application database, with a welcome credit balance ($1.00).
  3. Your locale (country, currency) is detected from your IP via Vercel geo headers, used for currency display only.

2. Top-up & credits

  1. On /billing you select a tier (e.g. $5, $20, $50, $100).
  2. Pick a payment method: international card (SePay), Vietnam bank transfer (VietQR), or USDT TRC-20.
  3. For card: SePay redirects you to a secure checkout, returns success / failure via signed webhook (IPN).
  4. For bank: a unique reference code CITXXXXXX is embedded in the VietQR payload. SePay webhook auto-detects matching deposits to the ACB account and grants credit instantly.
  5. For USDT: each tier maps to a unique amount with a random suffix. A daily TronScan poll matches incoming transactions and grants credit.
  6. Every grant is written to an immutable credit_transactions ledger.

3. Running a tool

  1. You open a tool page (e.g. /image) and submit a prompt + parameters.
  2. The browser sends the request to a Next.js server route on Vercel.
  3. The server: (a) verifies your Clerk session, (b) checks your balance against the tool's USD cost, (c) reserves the credit.
  4. The server forwards the job to the appropriate provider:
    • Image / Video → fal.ai (primary), Z8 self-hosted ComfyUI (fallback).
    • Voice → Z8 omnivoice (primary), Replicate XTTS-v2 (fallback).
    • Script → DeepSeek (Chat / Reasoner) or Anthropic Claude (Premium).
    • Transcript → Apify YouTube captions, or Groq Whisper for audio files.
    • Analytics / channel / market research → Apify scrapers + DeepSeek for summarization.
  5. The provider returns the result; the server writes a usage_log entry, finalizes the charge, and streams the result back to you.
  6. If the job fails before completion, the reserved credit is refunded automatically.

4. Result delivery & storage

  • Most outputs (text, audio, images, short videos) are streamed directly to your browser and offered for download.
  • Generated media is held in temporary storage only long enough to deliver to you; we do not maintain a media archive on your behalf.
  • You may connect Google Drive or Dropbox in /settings to save outputs directly to your own cloud.
  • Your invocation history (input metadata, cost, success/failure — not full content) is kept in /history for billing transparency.

5. Pricing logic

Each tool has a database row in tool_pricing with providerCostCents and markupRatio. The displayed price equals ROUND(provider_cost × markup), in USD cents. Local currency shown in the UI is reference only — calculated daily from Vietcombank (for VND) or Frankfurter.app (other currencies).

6. Refunds & failure handling

  • Automatic refund: any failed run before output is delivered.
  • Manual refund: if a delivered result is materially defective, contact [email protected] within 7 days with the run ID. See full terms at /refund.

7. Support & escalation

8. Compliance & legal

Use of Citipen is subject to our Terms of Service, Privacy Policy, Refund Policy, Acceptable Use Policy, and Security Policy. Disputes are governed by the laws of Vietnam.

© Citipen by TAK Trading Co., Ltd. — Đồng Nai, Việt Nam