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

enterprise-services.mddocs/

Enterprise Services

Enterprise-level payment services including payments to individuals, red packet distribution, and profit sharing functionality.

Capabilities

Enterprise Payments

Transfer funds from merchant account to individual users.

/**
 * Send enterprise payment to individual user
 * @param request Enterprise payment request
 * @return Payment result with transaction details
 * @throws WxPayException if payment fails
 */
EntPayResult entPay(EntPayRequest request) throws WxPayException;

/**
 * Query enterprise payment status
 * @param request Payment query request
 * @return Payment query result
 * @throws WxPayException if query fails
 */
EntPayQueryResult queryEntPay(EntPayQueryRequest request) throws WxPayException;

Usage Example:

// Send payment to user
EntPayRequest request = EntPayRequest.newBuilder()
    .partnerTradeNo("ENT_PAY_001")
    .openid("user-openid")
    .amount(100) // Amount in cents
    .desc("Refund payment")
    .spbillCreateIp("192.168.1.1")
    .build();

EntPayResult result = wxPayService.entPay(request);

Red Packet Distribution

Send promotional red packets to users.

/**
 * Send red packet to user
 * @param request Red packet request
 * @return Red packet result
 * @throws WxPayException if sending fails
 */
WxPaySendRedpackResult sendRedpack(WxPaySendRedpackRequest request) throws WxPayException;

/**
 * Query red packet status
 * @param request Red packet query request
 * @return Query result with red packet details
 * @throws WxPayException if query fails
 */
WxPayRedpackQueryResult queryRedpack(WxPayRedpackQueryRequest request) throws WxPayException;

Profit Sharing

Distribute transaction profits among multiple parties.

/**
 * Execute profit sharing
 * @param request Profit sharing request
 * @return Sharing result
 * @throws WxPayException if sharing fails
 */
ProfitSharingResult profitSharing(ProfitSharingRequest request) throws WxPayException;

/**
 * Add profit sharing receiver
 * @param request Receiver addition request
 * @return Addition result
 * @throws WxPayException if addition fails
 */
ProfitSharingReceiverResult addReceiver(ProfitSharingAddReceiverRequest request) throws WxPayException;

Service Access

Get Enterprise Services

/**
 * Get enterprise payment service
 * @return Enterprise payment service instance
 */
EntPayService getEntPayService();

/**
 * Get red packet service
 * @return Red packet service instance
 */
RedpackService getRedpackService();

/**
 * Get profit sharing service
 * @return Profit sharing service instance
 */
ProfitSharingService getProfitSharingService();

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