Cloee Docs
Paymenter ExtensionsAI Assistant

AI Assistant

1. Prepare the extension package as a ZIP.

1) Install the extension in Paymenter

  1. Prepare the extension package as a ZIP.
  2. In Paymenter admin, open the Extensions area and upload the ZIP.
  3. Install/enable the AIAssistant extension.
  4. Open extension settings and save your baseline configuration.

After installation, configure these admin sections under Extensions -> AI Assistant:

  • AI Providers
  • Prompt Studio
  • Ticket Responders (optional)

2) First-time baseline settings

In extension config, set these first:

  • assistant_display_name: use your brand voice (example: Acme Support Assistant).
  • assistant_avatar_url: set a stable public image URL.
  • max_requests_per_minute and monthly_request_limit: start conservative and raise only after observing usage.
  • allow_ticket_creation_tool: keep enabled only if you want the AI to open tickets.
  • ticket_ai_actor_user_id: use a dedicated staff account for AI-authored ticket messages.
  • enable_request_debug_logging: enable only for troubleshooting, disable in production.

3) Prompt best practices (company/staff identity)

Create/update your profile in Prompt Studio and include explicit identity and behavior rules.

Recommended system-prompt structure:

You are {{CompanyName}}'s billing and hosting support assistant.

Identity:
- Speak as a member of the {{CompanyName}} support team.
- If asked who you are, state you are an AI assistant for {{CompanyName}}.

Behavior:
- Be concise, polite, and action-oriented.
- Use available tools for invoices/tickets/services instead of guessing.
- Never claim actions were completed unless a tool confirms it.
- If data is missing, ask one specific follow-up question.

Escalation:
- If the issue requires human review (billing dispute, abuse, legal, account recovery), create or recommend a support ticket.

Security:
- Never request passwords, API secrets, or full card/bank details.

Practical additions for teams:

  • Add your SLA expectations (for example: "urgent billing issues: escalate immediately").
  • Add product naming conventions exactly as your portal shows them.
  • Add tone rules for multilingual or region-specific customer messaging.

4) Ticket responder best practices

For Ticket Responders:

  • Keep responders narrow (billing, VPS reboot, cancellation, etc.) with clear keyword sets.
  • Set max_triggers_per_ticket low (usually 1 or 2) to avoid loops.
  • Use LLM responders for triage and information collection, not irreversible actions.
  • Include a fallback line such as: "I need a human teammate for this step; I am escalating now."
  • Remind users they can control automation with STOP and AI START in the ticket thread.

5) Provider mapping in Paymenter

Paymenter provider profiles supported by this extension:

  • openai
  • google
  • openrouter
  • custom (OpenAI-compatible)

Default base URLs used by the extension:

  • google -> https://generativelanguage.googleapis.com/v1beta/openai
  • openrouter -> https://openrouter.ai/api/v1
  • openai and other fallback -> https://api.openai.com/v1

For non-built-in providers, use profile custom and set the provider's OpenAI-compatible base URL.

6) Free providers list (source)

Free-provider options in this guide are based on:

  • https://github.com/cheahjs/free-llm-api-resources?tab=readme-ov-file#free-providers

That list changes frequently. Always re-check limits/models before rollout.

7) API-key setup walkthroughs (free-provider focused)

Why: built-in profile support and broad free model catalog.

  1. Create an account at https://openrouter.ai and generate an API key.
  2. In Paymenter: AI Providers -> Create.
  3. Set:
    • profile: openrouter
    • api_key: your OpenRouter key
    • model: a free model from the OpenRouter free list (example format: ...:free)
  4. Optional headers in provider form:
    • openrouter_referer
    • openrouter_title
  5. Save and test in /account/ai-assistant.

Reference:

  • OpenRouter quickstart: https://openrouter.ai/docs/quickstart

B) Google AI Studio

Why: listed as a free provider source with daily/request limits.

  1. Create an API key from Google AI Studio (https://aistudio.google.com).
  2. In Paymenter: AI Providers -> Create.
  3. Set:
    • profile: google
    • api_key: your Google key
    • model: one of the currently free-tier models listed in AI Studio/free-provider list (for example Gemini Flash tier models)
  4. Keep base_url empty to use extension default unless you have a specific override.
  5. Save and test.

Reference:

  • Free provider listing and published limits: https://github.com/cheahjs/free-llm-api-resources?tab=readme-ov-file#google-ai-studio

C) Cerebras

Why: free API key path is documented and endpoint is OpenAI-compatible.

  1. Create an account at https://cloud.cerebras.ai.
  2. Open API Keys and create a key.
  3. In Paymenter: AI Providers -> Create.
  4. Set:
    • profile: custom
    • base_url: https://api.cerebras.ai/v1
    • api_key: your Cerebras key
    • model: a free-tier model currently offered in Cerebras/free-provider listing
  5. Save and test.

References:

  • Quickstart: https://inference-docs.cerebras.ai/quickstart
  • Free-provider listing: https://github.com/cheahjs/free-llm-api-resources?tab=readme-ov-file#cerebras

D) Groq

Why: free model quotas listed; OpenAI-compatible base URL documented.

  1. Create an account at https://console.groq.com.
  2. Generate an API key (/keys).
  3. In Paymenter: AI Providers -> Create.
  4. Set:
    • profile: custom
    • base_url: https://api.groq.com/openai/v1
    • api_key: your Groq key
    • model: a currently free model from Groq/free-provider listing
  5. Save and test.

References:

  • Quickstart: https://console.groq.com/docs/quickstart
  • OpenAI compatibility: https://console.groq.com/docs/openai
  • Free-provider listing: https://github.com/cheahjs/free-llm-api-resources?tab=readme-ov-file#groq

E) Mistral (La Plateforme)

Why: listed as free-tier option (with plan/verification conditions).

  1. Create account/workspace and API key in Mistral console.
  2. In Paymenter: AI Providers -> Create.
  3. Set:
    • profile: custom
    • base_url: https://api.mistral.ai/v1
    • api_key: your Mistral key
    • model: a currently available model from your Mistral account/free-provider listing
  4. Save and test.

References:

  • Account/key setup: https://docs.mistral.ai/getting-started/quickstart/
  • Chat API endpoint example: https://docs.mistral.ai/api/endpoint/chat
  • Free-provider listing: https://github.com/cheahjs/free-llm-api-resources?tab=readme-ov-file#mistral-la-plateforme

8) Validation checklist after setup

  • Send: "List my latest invoices" and confirm tool-backed data appears.
  • Send: "Show my services" and verify user-scoped results only.
  • Ask for a ticket action and confirm behavior matches your allow_ticket_creation_tool policy.
  • Verify AI disclaimer appears in generated responses.
  • If using ticket responders, test STOP and AI START on a test ticket.

9) Operations and safety notes

  • Keep at least two providers enabled with different priorities for failover.
  • Set provider-level limits (requests/tokens) to prevent exhausting free quotas too early.
  • Keep expose_internal_error_details off in production.
  • Re-check free-tier policies regularly; limits/models can change without notice.

On this page