WeChat Pay API v3 Go SDK

repository·main·Indexed 22 days ago

https://github.com/wechatpay-apiv3/wechatpay-go

Official Go client library for WeChat Pay API v3, providing high-level service wrappers, automatic certificate management, and secure request signing. It includes modules for Cash Coupons (立减金), Pay Gift (支付有礼) marketing activities, Gold Plan (点金计划) management, Lovefeast (爱心餐) public welfare program, and Merchant Exclusive Coupons.

Tokens
169.4K
Snippets
176
Records
710
Agent score
78%

What's inside wechatpay-go

  1. Overview of WeChat Pay API v3 Business Interfaces

    main

    The wechatpay-go SDK provides access to various WeChat Pay business interfaces categorized by the type of merchant: Direct Merchant (直连商户) and Service Provider (服务商).

    Use the following mapping to determine which interface to use based on your merchant type:

    Interface PathBusiness NameDirect MerchantService Provider
    certificatesPlatform Certificates✔️✔️
    payments/appAPP Payment✔️
    payments/jsapiJSAPI Payment✔️
    payments/nativeNative Payment✔️
    payments/h5H5 Payment✔️
    partnerpayments/appAPP Payment✔️
    partnerpayments/jsapiJSAPI Payment✔️
    partnerpayments/nativeNative Payment✔️
    partnerpayments/h5H5 Payment✔️
    profitsharingProfit Sharing✔️✔️
    refunddomesticRefund✔️✔️
    transferbatchMerchant Transfer✔️
    payrollcardMicro Work Card✔️
    weixinpayscanandrideScan & Ride✔️✔️
    lovefeastLove Feast✔️
    goldplanGold Plan✔️
    wexinpayscoreparkingWeChat Pay Score Parking✔️✔️
    merchantexclusivecouponMerchant Exclusive Coupon✔️✔️
    giftactivityGift Activity✔️✔️
    cashcouponsCash Coupons✔️✔️
    retailstoreRetail Store✔️✔️
  2. Overview of the Payroll Card API v3 Go SDK

    main

    The Payroll Card API v3 Go SDK allows service providers to manage WeChat Payroll Card (微工卡) operations. Key capabilities include:

    • Querying authorization relationships between merchants and payroll cards.
    • Generating pre-authorization tokens.
    • Creating pre-orders for identity verification (核身).
    • Querying identity verification results.
    • Initiating batch transfers.

    This SDK is generated using the OpenAPI Generator and is currently at API version 1.5.2.

  3. Overview of H5 Payment API in wechatpay-go

    main

    The partnerpayments/h5 package provides a Go SDK for WeChat Pay H5 payment APIs. This SDK is generated using OpenAPI Generator and is designed to interact with the WeChat Pay API base URL: https://api.mch.weixin.qq.com.

    For detailed business logic and documentation, refer to the official WeChat Pay documentation at https://pay.weixin.qq.com/wiki/doc/apiv3/index.shtml.

  4. Overview of the giftactivity API

    main

    The giftactivity module is part of the WeChat Pay API v3 Go SDK, specifically designed for managing 'Pay Gift' (支付有礼) marketing activities. This SDK was generated using the OpenAPI Generator and provides programmatic access to create, manage, and terminate gift activities, as well as manage participating merchant accounts and product lists associated with these activities.

    All API requests are directed to the base URL: https://api.mch.weixin.qq.com.

  5. Overview of WeChat Pay API v3 Payments SDK

    main

    This SDK provides Go client implementations for WeChat Pay API v3 direct merchant basic payments. It is automatically generated using OpenAPI Generator.

    Key Information:

    • API Version: 1.2.3
    • Base URL: All API requests are directed to https://api.mch.weixin.qq.com.
    • Official Documentation: For detailed business logic and API specifications, refer to the WeChat Pay API v3 Documentation.
  6. Overview of the WeChat Pay Lovefeast API Go SDK

    main

    The lovefeast SDK is a specialized Go client generated via OpenAPI Generator for the WeChat Pay 'Lovefeast' (爱心餐) public welfare program. This program facilitates digital identity authentication and welfare distribution for sanitation workers in Shenzhen, and allows users to make small donations (e.g., 1 RMB) during meal ordering.

    All API requests are directed to the base URL: https://api.mch.weixin.qq.com.

    Note: This specific SDK version is part of a generated set (API Version: 0.0.4).

  7. Overview of App Payment APIs

    main

    The app service in wechatpay-go provides methods for handling APP-based WeChat Pay transactions. All requests are based on the WeChat Pay API base URL: https://api.mch.weixin.qq.com.

    Available methods:

    • CloseOrder: Closes an existing order.
    • Prepay: Initiates an APP payment order.
    • QueryOrderById: Queries an order using the WeChat Pay transaction ID.
    • QueryOrderByOutTradeNo: Queries an order using the merchant's order number.