Documentation Index Fetch the complete documentation index at: https://docs.profy.cn/llms.txt
Use this file to discover all available pages before exploring further.
Finance & Payments
Profy uses a coin-based virtual currency system for all platform transactions. Users recharge coins through real-money payment channels and consume them for tasks, agent usage, and premium features.
Overview
Coin System
Coins are the universal unit of value on the platform. All billable operations deduct from the user’s coin balance.
Balance API
Method Endpoint Auth Description GET/api/finance/balanceJWT Get current coin balance POST/api/finance/consumeJWT Consume coins for a service POST/api/finance/preCheckJWT Validate balance before consumption POST/api/finance/recordsJWT Query consumption history
Consumption Types
Type Use Case Billing Model TOKENAI agent token usage Per-token rate DURATIONTime-based services Per-minute rate FIXEDOne-time operations Fixed coin amount
Idempotent Consumption
Every consumption request includes an idempotency key to prevent duplicate charges. The system checks Redis before processing:
Recharge Flow
Users top up their coin balance by purchasing recharge plans through payment channels.
Recharge API
Method Endpoint Auth Description GET/api/finance/recharge/plansJWT List available recharge plans GET/api/finance/recharge/previewJWT Preview order before payment POST/api/finance/recharge/createJWT Create a recharge order GET/api/finance/recharge/status/:orderNoJWT Check order status POST/api/finance/recharge/summaryJWT Recharge summary statistics POST/api/finance/recharge/recordsJWT Recharge history
Recharge Lifecycle
User selects a recharge plan from the catalog
System creates a recharge order and a linked payment order
Payment channel returns a pay URL (QR code for WeChat Native Pay)
User completes payment on the external channel
Payment callback arrives at /api/payment/notify/:channel
System credits coins to the user’s balance
Payment Channels
WeChat Pay
Profy integrates with WeChat Pay using the Native payment method (QR code scan) via wechatpay-node-v3.
Config Variable Description WECHAT_PAY_APP_IDWeChat application ID WECHAT_PAY_MCH_IDMerchant ID WECHAT_PAY_SERIAL_NOAPI certificate serial number WECHAT_PAY_PRIVATE_KEYRSA private key for signing WECHAT_PAY_API_V3_KEYAPIv3 key for callback decryption
Alipay
Alipay integration uses alipay-sdk as an alternative payment strategy.
Payment API
Method Endpoint Auth Description POST/api/payment/createJWT Create a payment order GET/api/payment/status/:outTradeNoJWT Query payment status POST/api/payment/close/:outTradeNoJWT Close an unpaid order POST/api/payment/notify/:channelNone Callback from payment provider
Payment Callback Flow
Service Plans
Service plans define tiered access levels for platform services (e.g., Expert agent tiers).
Method Endpoint Auth Description GET/api/finance/servicePlan/listJWT List plans by ?serviceCode=
Consumption Records
Users can view a detailed breakdown of their spending:
Method Endpoint Auth Description POST/api/consumption/summaryJWT Aggregated spending summary POST/api/consumption/recordsJWT Detailed transaction log
OpenAPI Consumption
The AutoExpert agent engine uses API Key authentication to consume credits programmatically:
Method Endpoint Auth Description POST/openapi/coin/consumeAPI Key Consume coins on behalf of a user POST/openapi/coin/preCheckAPI Key Pre-validate consumption GET/openapi/coin/balanceAPI Key Query balance
Related Pages
Authentication JWT and API Key auth for finance endpoints
Task Orchestration Tasks consume coins through pay-to-view
Agent Platform AutoExpert uses OpenAPI coin consumption for credit billing