Skip to content

Trade Complaints ​

Updated: 12/1/26, 5:47:01 PM

Complaints filed by consumers in Alipay / WeChat are synced through the channel as platform complaint tickets. The admin panel and merchant panel handle them with the same actions: view details, reply, upload evidence and report finished. Menu path: Complaints & Exceptions → Complaint Tickets (same menu on both panels; entry path /trade/complaint).

Complaints have a response deadline (typically 72 hours for Alipay). Overdue tickets are flagged and affect the merchant's rating on the channel side, so handle them first.

Supported Scope ​

A complaint ticket is recorded along two dimensions — channel × complaint platform: the channel decides which payment channel is used for sync and reply, and the complaint platform identifies which official source the complaint came from.

Complaint platformIntegration formsSupported abilities
AlipayDirect (alipay) / service provider (alipay_isv)Sync, single-ticket refetch, reply, finish, evidence upload; payer images are public URLs and displayed directly
WeChatDirect (wechat_pay) / service provider (wechat_isv)Sync, single-ticket refetch, reply, finish, evidence upload, payer image proxy download (temporary URLs that expire)
DouyinPlatform enum placeholderReal API not integrated; no tickets are produced

The detail endpoint returns an abilities set for the current channel + platform, and the UI shows only the supported action buttons; calling an undeclared ability returns "unsupported ability".

Sync window and idempotency

Complaint sync always pulls the last 7 days and updates idempotently by "channel + complaint platform + channel complaint ID", so re-syncing never creates duplicate tickets; negotiation messages are also idempotent by their channel negotiation message ID.

Ticket List ​

Filters: platform complaint No., channel complaint ID, fund trade No., merchant (admin only), complaint platform, status, overdue flag.

Columns: platform complaint No., payment channel, complaint platform, merchant (admin only), complaint amount, issue type, status, complaint time, response deadline (red "Overdue" tag when exceeded), creation time.

StatusMeaning
Pending (pending)The user has complained and the merchant has not replied yet
Processing (processing)The merchant has replied; negotiation is still open
Finished (finished)Reported finished to the channel (terminal state)

The status is maintained by the platform; the raw channel status is kept in a separate "channel status" column for reference only.

Complaint ticket list

Figure: Complaint ticket list showing the platform complaint No., payment channel, complaint platform, merchant, amount and status, with "Sync Now" and "Sync Records" in the toolbar

Details and Handling ​

The detail drawer has four blocks: Basic Info (complaint No., channel complaint ID, trade No., amount, issue type / reason / content, complainant, masked contact, status and deadline), payer images, negotiation history and reply. The admin panel additionally shows callback records (the intake ledger of WeChat complaint notifications).

Complaint details

Figure: Complaint details page: progress and related trade on the left; payer complaint, negotiation history and reply area on the right

Negotiation History ​

A timeline of user messages (user) and merchant replies (merchant); an admin-panel reply is submitted to the channel on the merchant's behalf and is also recorded locally as a merchant reply. Every reply is sent to the channel and archived.

Replying ​

  • Enter the reply (respond within 72 hours) and optionally attach evidence images: upload them first to obtain image credentials, then submit them with the reply;
  • A successful reply appends a negotiation record and moves the ticket from Pending to Processing;
  • Finished tickets cannot be replied to; if the channel does not declare the reply ability, the action is rejected.

Reply area

Figure: Reply area: enter the reply, upload evidence images and send; the reply is synced to the channel

Marking Finished ​

After a second confirmation the platform reports the ticket finished to the channel and the ticket becomes Finished; repeating the action on a finished ticket is idempotent. Negotiate with the complainant first to avoid a rushed closure that triggers a second complaint.

About Images ​

  • WeChat: payer images are temporary channel resources; the frontend displays them through the platform proxy (GET .../complaint/image?complaintId=&mediaId=), and an expired image prompts "Image expired. Please sync again and retry";
  • Alipay: payer images are public URLs and are displayed directly, no proxy needed;
  • Evidence images are submitted through the upload endpoint (file name + Base64), and the returned credential is delivered to the channel with the reply.

Sync Mechanism ​

Scheduled Sync ​

TaskFrequencyDescription
Complaint incremental pollEvery 30 minutes (offset 40 s)Pulls the last 7 days of complaints for all enabled channel merchants and saves idempotently
Unfinished ticket refreshHourly (at minute 15, second 20)Refetches pending/processing tickets via the single-ticket detail API, up to 100 per batch, covering the list's time-window blind spot
Overdue scanEvery 30 minutes (offset 10 s)Marks tickets past their deadline and not finished as overdue, flags them in the list and logs each one at WARN

Global switch: daxpay.platform.config.complaint-sync-enabled (default true). Turning it off only stops the scheduled poll; manual triggers from the admin panel are unaffected. Scheduled and manual triggers share one distributed lock (lock:complaintSync:sync); on conflict the task is marked "Skipped" rather than silently dropped.

Manual Sync (Admin Panel) ​

"Sync Now" on the list opens the sync dialog:

Sync complaint dialog

Figure: "Sync Complaints" dialog: choose all enabled channel merchants or one channel merchant; the time window is fixed to the last 7 days

  • Scope: all enabled channel merchants, or one selected channel merchant;
  • Filters: merchant No., channel merchant No., payment channel, payment product (all applied together as an intersection; all empty means full scan);
  • Time window: fixed to the last 7 days (the channel API pulls by time window);
  • Submitting returns a task ID immediately and runs asynchronously; the list is not blocked — refresh later or check "Sync Records".

Execution Ledger ​

Every trigger (scheduled / manual / callback) creates one sync task, and each channel merchant gets one sync record:

LevelStatuses
TaskRunning (running) / Success (success) / Partially failed (partial) / Failed (failed) / Skipped (skipped)
RecordSuccess (success, fetched and saved) / Failed (failed, channel call or save error) / Skipped (skipped, channel has no complaint ability)

A task record contains trigger type (scheduled / manual / callback), operator, scope, time window, start/end time, duration, merchant success/failure counts, fetched and saved counts, and failure reason. Each record supports single-merchant retry (creates a manual task for that merchant / channel / product and reruns only the last 7 days).

Sync records

Figure: Sync records: each task lists success / failure / skip counts per channel merchant, with drill-down into records

Complaint Callback (WeChat) ​

Besides polling, WeChat supports a complaint notification callback so that new complaints and status changes arrive in real time; the callback is only an accelerator — missed deliveries are still covered by polling.

Prerequisites ​

  • Complaint callback is supported by default and enabled per channel merchant / service provider; there is no platform-level feature switch;
  • The backend API URL under System Management → System Config → Platform Config → Endpoint Config must be a public HTTPS address, otherwise registration is impossible (the page shows "Backend address not configured or not HTTPS").

Merchant-Level Toggle (WeChat Direct) ​

Entry: Channel Merchants → WeChat (direct) → Complaint Callback card.

  • Enabling registers the callback URL {backend URL}/unipay/callback/{mchNo}/{channelMchNo}/wechat/complaint with WeChat; disabling unregisters it;
  • A WeChat merchant ID can have only one complaint callback URL; enabling overwrites the URL configured outside the platform, and disabling deletes it;
  • The card shows the platform-side URL, the channel-side registered URL, registration status, last registration time and failure reason; if the URLs differ, the platform unregisters the old one and registers the new one;
  • A callback resolves the merchant from the ticket and creates a callback-sourced targeted sync task for that channel merchant only; the same notification ID is deduplicated for 30 minutes.

Service-Provider-Level Toggle (WeChat Service Provider) ​

Entry: Channel Merchants → WeChat Service Provider → Service-Provider Complaint Callback card.

  • The service-provider callback is provider-level (one URL receives pushes for all sub-merchants); the toggle is platform-level with no merchant parameter;
  • URL: {backend URL}/unipay/callback/wechat/isv/complaint;
  • The callback body contains only the complaint ID and action type; the platform resolves the complained merchant ID from the ticket detail to locate the sub-merchant binding, and falls back to a full service-provider sync when it cannot resolve, so events are never lost.

Alipay has no complaint callback

Alipay complaints rely solely on scheduled polling and manual sync; no callback URL needs to be configured.

Admin vs. Merchant Panel ​

CapabilityAdmin panelMerchant panel
Visible scopePlatform-wide (filterable by merchant)Own merchant only
Reply / evidence upload / mark finishedSupported; replies are submitted on the merchant's behalfSupported; replies are submitted as the merchant
Sync now / sync records / per-record retrySupportedNot provided
Callback records (WeChat notification ledger)SupportedNot provided
Complaint callback configurationChannel merchant page (reuses channel merchant permissions)Not provided

The merchant panel suits delegating frontline handling to merchants; the admin panel keeps the platform-wide view for chasing overdue tickets and handling them on the merchant's behalf.

Permission Codes ​

Permission codePurpose
trade:complaint:viewList, detail, negotiation history, callback records, sync task/record queries
trade:complaint:manageReply, evidence upload, mark finished, sync now, per-record retry

WeChat complaint callback configuration adds no new permission code; it reuses the channel merchant menu (channel:merchant) view/manage permissions.

API Reference ​

Admin Panel (/admin/complaint) ​

MethodPathDescription
GET/admin/complaint/pageComplaint tickets, paged
GET/admin/complaint/get-by-idTicket detail (including abilities)
GET/admin/complaint/negotiation-listNegotiation timeline
GET/admin/complaint/notify-record/listCallback records
POST/admin/complaint/replyReply on behalf of the merchant
POST/admin/complaint/finishMark finished
POST/admin/complaint/upload-imageUpload evidence image
GET/admin/complaint/imageProxy-download payer image
POST/admin/complaint/sync-nowTrigger a manual sync (optional filters, returns task ID)
GET/admin/complaint/sync-task/pageSync tasks, paged
GET/admin/complaint/sync-task/getSync task detail
GET/admin/complaint/sync-record/listSync task records
POST/admin/complaint/sync-record/retryRetry one sync record
GET/admin/complaint/sync-candidatesChannel merchant candidates for sync

Merchant Panel (/mch/complaint) ​

MethodPathDescription
GET/mch/complaint/pageOwn merchant's complaints, paged
GET/mch/complaint/get-by-idDetail (including abilities)
GET/mch/complaint/negotiation-listNegotiation timeline
POST/mch/complaint/replyReply
POST/mch/complaint/finishMark finished
POST/mch/complaint/upload-imageUpload evidence image
GET/mch/complaint/imageProxy-download payer image

WeChat Complaint Callback Configuration ​

MethodPathDescription
GET / POST/admin/wechat/complaint-notify-config/get, /toggleWeChat direct merchant-level callback query / toggle
GET / POST/admin/wechat/isv/complaint-notify-config/get, /toggleWeChat service-provider-level callback query / toggle

Deployment and Troubleshooting ​

  • Response deadline: use the deadline delivered by the channel (typically 72 hours for Alipay); the overdue flag is maintained by the scheduled scan — set monitoring on the overdue WARN logs.
  • New complaints not synced: first confirm the complaint sync job is not disabled, the channel merchant is enabled and the channel declares the complaint ability; check "Sync Records" for failed records of the round and retry them directly.
  • Callback enabled but polling still does the work: check that the backend URL is public HTTPS, the channel-side registered URL matches the platform's, and the channel merchant toggle is still on; missed callbacks are filled in by the next poll.
  • Complaint images do not open: WeChat temporary resources have expired — re-sync to refresh the URL and retry; Alipay images are public URLs, so check whether the user-side resource is still valid.
  • No reply button: finished tickets cannot be replied to; the channel may also not declare the REPLY ability (check the abilities returned in the detail).