CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-com-github-binarywang--weixin-java-pay

Comprehensive Java SDK for integrating with WeChat Pay services including unified orders, refunds, enterprise payments, red packets, profit sharing, and marketing services

Pending
Overview
Eval results
Files

advanced-services.mddocs/

Advanced Services

Specialized services including e-commerce platform support, marketing coupons, transfer services, Pay Score, complaint management, and bill downloads.

Capabilities

Marketing Services

Manage marketing coupons and promotional campaigns.

/**
 * Get marketing favor service for coupon management
 * @return Marketing favor service instance
 */
MarketingFavorService getMarketingFavorService();

/**
 * Get marketing business favor service
 * @return Business favor service instance
 */
MarketingBusiFavorService getMarketingBusiFavorService();

Usage Example:

// Create coupon stock
MarketingFavorService favorService = wxPayService.getMarketingFavorService();
CreateStockRequest request = new CreateStockRequest();
// Configure coupon details...
CreateStockResult result = favorService.createStock(request);

E-commerce Platform Services

Support for multi-merchant e-commerce platforms.

/**
 * Get e-commerce service for platform operations
 * @return E-commerce service instance
 */
EcommerceService getEcommerceService();

Transfer Services

Various transfer and payout services.

/**
 * Get general transfer service
 * @return Transfer service instance
 */
TransferService getTransferService();

/**
 * Get merchant transfer service
 * @return Merchant transfer service instance
 */
MerchantTransferService getMerchantTransferService();

/**
 * Get brand merchant transfer service
 * @return Brand merchant transfer service instance
 */
BrandMerchantTransferService getBrandMerchantTransferService();

/**
 * Get partner transfer service (for service providers)
 * @return Partner transfer service instance
 */
PartnerTransferService getPartnerTransferService();

Pay Score Services

Credit-based payment and scoring services.

/**
 * Get Pay Score service
 * @return Pay Score service instance
 */
PayScoreService getPayScoreService();

/**
 * Get partner Pay Score service
 * @return Partner Pay Score service instance
 */
PartnerPayScoreService getPartnerPayScoreService();

/**
 * Get partner Pay Score sign plan service
 * @return Partner Pay Score sign plan service instance
 */
PartnerPayScoreSignPlanService getPartnerPayScoreSignPlanService();

Bill Management

Download transaction and settlement reports with support for both v2 and v3 APIs.

/**
 * Download bill data using parameters
 * @param billDate Bill date (YYYYMMDD format)
 * @param billType Bill type (ALL, SUCCESS, REFUND)
 * @param tarType Archive type (GZIP or null)
 * @param deviceInfo Device info (optional)
 * @return Bill data result
 * @throws WxPayException if download fails
 */
WxPayBillResult downloadBill(String billDate, String billType, String tarType, String deviceInfo) throws WxPayException;

/**
 * Download bill data using request object
 * @param request Bill download request
 * @return Bill data result
 * @throws WxPayException if download fails
 */
WxPayBillResult downloadBill(WxPayDownloadBillRequest request) throws WxPayException;

/**
 * Download raw bill data as string
 * @param request Bill download request
 * @return Raw bill data
 * @throws WxPayException if download fails
 */
String downloadRawBill(WxPayDownloadBillRequest request) throws WxPayException;

/**
 * Download fund flow data
 * @param billDate Bill date (YYYYMMDD format)
 * @param accountType Account type (Basic, Operation, Fees)
 * @param tarType Archive type (GZIP or null)
 * @return Fund flow result
 * @throws WxPayException if download fails
 */
WxPayFundFlowResult downloadFundFlow(String billDate, String accountType, String tarType) throws WxPayException;

/**
 * Download fund flow data using request object
 * @param request Fund flow request
 * @return Fund flow result
 * @throws WxPayException if download fails
 */
WxPayFundFlowResult downloadFundFlow(WxPayDownloadFundFlowRequest request) throws WxPayException;

/**
 * Apply for trade bill download (API v3)
 * @param request Trade bill request
 * @return Bill application result with download URL
 * @throws WxPayException if request fails
 */
WxPayApplyBillV3Result applyTradeBill(WxPayApplyTradeBillV3Request request) throws WxPayException;

/**
 * Apply for fund flow bill download (API v3)
 * @param request Fund flow bill request
 * @return Bill application result with download URL
 * @throws WxPayException if request fails
 */
WxPayApplyBillV3Result applyFundFlowBill(WxPayApplyFundFlowBillV3Request request) throws WxPayException;

/**
 * Download bill from URL (API v3)
 * @param url Download URL from bill application
 * @return Bill data stream
 * @throws WxPayException if download fails
 */
InputStream downloadBill(String url) throws WxPayException;

Usage Example:

// Download daily transaction bill
WxPayBillRequest billRequest = WxPayBillRequest.newBuilder()
    .billDate("20230101")
    .billType(WxPayConstants.BillType.ALL)
    .build();

WxPayBillResult billResult = wxPayService.downloadBill(billRequest);
String billData = billResult.getBillInfo();

Complaint Management

Handle customer complaints and disputes.

/**
 * Get complaints service
 * @return Complaint service instance
 */
ComplaintService getComplaintsService();

Media Upload Services

Upload images and other media for marketing and documentation.

/**
 * Get merchant media service
 * @return Media upload service instance
 */
MerchantMediaService getMerchantMediaService();

/**
 * Get marketing media service
 * @return Marketing media service instance
 */
MarketingMediaService getMarketingMediaService();

Bank Services

Bank-related operations and queries.

/**
 * Get bank service
 * @return Bank service instance
 */
BankService getBankService();

Application Services

Merchant application and onboarding services.

/**
 * Get sub-merchant application service
 * @return Application service instance
 */
Applyment4SubService getApplyment4SubService();

/**
 * Get subject confirmation service
 * @return Subject confirmation service instance
 */
Apply4SubjectConfirmService getApply4SubjectConfirmService();

Payroll Services

Employee payroll and wage payment services.

/**
 * Get payroll service for employee payments
 * @return Payroll service instance
 */
PayrollService getPayrollService();

Business Circle Services

Smart business circle and location-based services.

/**
 * Get business circle service
 * @return Business circle service instance
 */
BusinessCircleService getBusinessCircleService();

Face Payment Services

Support for facial recognition payments.

/**
 * Get face authentication info for face payment setup
 * @param request Face auth info request
 * @return Face authentication result
 * @throws WxPayException if authentication fails
 */
WxPayFaceAuthInfoResult getWxPayFaceAuthInfo(WxPayFaceAuthInfoRequest request) throws WxPayException;

/**
 * Process face payment
 * @param request Face payment request
 * @return Face payment result
 * @throws WxPayException if payment fails
 */
WxPayFacepayResult facepay(WxPayFacepayRequest request) throws WxPayException;

Coupon Management

WeChat Pay coupon distribution and management.

/**
 * Send coupon to user
 * @param request Coupon send request
 * @return Coupon send result
 * @throws WxPayException if sending fails
 */
WxPayCouponSendResult sendCoupon(WxPayCouponSendRequest request) throws WxPayException;

/**
 * Query coupon stock information
 * @param request Coupon stock query request
 * @return Coupon stock information
 * @throws WxPayException if query fails
 */
WxPayCouponStockQueryResult queryCouponStock(WxPayCouponStockQueryRequest request) throws WxPayException;

/**
 * Query specific coupon information
 * @param request Coupon info query request
 * @return Coupon detailed information
 * @throws WxPayException if query fails
 */
WxPayCouponInfoQueryResult queryCouponInfo(WxPayCouponInfoQueryRequest request) throws WxPayException;

Additional Utility Services

/**
 * Query customer comments (for service improvement)
 * @param beginDate Start date for comment query
 * @param endDate End date for comment query
 * @param offset Query offset
 * @param limit Query limit
 * @return Comment data as JSON string
 * @throws WxPayException if query fails
 */
String queryComment(Date beginDate, Date endDate, Integer offset, Integer limit) throws WxPayException;

/**
 * Query comment using request object
 * @param request Comment query request
 * @return Comment data as JSON string
 * @throws WxPayException if query fails
 */
String queryComment(WxPayQueryCommentRequest request) throws WxPayException;

/**
 * Query exchange rate for foreign currency
 * @param feeType Currency type
 * @param date Query date
 * @return Exchange rate result
 * @throws WxPayException if query fails
 */
WxPayQueryExchangeRateResult queryExchangeRate(String feeType, String date) throws WxPayException;

/**
 * Get sandbox sign key for testing
 * @return Sandbox signature key
 * @throws WxPayException if retrieval fails
 */
String getSandboxSignKey() throws WxPayException;

/**
 * Report API call statistics (for monitoring)
 * @param request Report request with call statistics
 * @throws WxPayException if reporting fails
 */
void report(WxPayReportRequest request) throws WxPayException;

Service Integration Patterns

Service Access Pattern

// Get specialized service
MarketingFavorService favorService = wxPayService.getMarketingFavorService();

// Use service methods
CreateStockRequest request = new CreateStockRequest();
CreateStockResult result = favorService.createStock(request);

Multi-Service Operations

// Combine multiple services
EcommerceService ecommerce = wxPayService.getEcommerceService();
TransferService transfer = wxPayService.getTransferService();
ComplaintService complaint = wxPayService.getComplaintService();

// Orchestrate complex business flows
// 1. Process e-commerce transaction
// 2. Handle transfers
// 3. Manage any complaints

Bill Types and Constants

WxPayConstants.BillType

class BillType {
    String ALL = "ALL";           // All transactions
    String SUCCESS = "SUCCESS";   // Successful transactions only
    String REFUND = "REFUND";     // Refund transactions only
    String RECHARGE_REFUND = "RECHARGE_REFUND"; // Recharge refunds
}

Advanced Features

  • Multi-tenant Architecture: Support for platform businesses
  • Marketing Automation: Automated coupon distribution and management
  • Financial Reporting: Comprehensive transaction and settlement reports
  • Dispute Resolution: Automated complaint handling workflows
  • Compliance Tools: Regulatory reporting and audit trail support

Install with Tessl CLI

npx tessl i tessl/maven-com-github-binarywang--weixin-java-pay

docs

advanced-services.md

configuration-security.md

core-payment.md

enterprise-services.md

index.md

notification-processing.md

payment-methods.md

refund-management.md

tile.json