Add WeChat Pay V3 or Alipay V3 checkout to a Go web application using a pre-built client instead of writing raw payment API integration code.
Query order status, process refunds, and handle payment callbacks for Chinese payment providers in a Go backend service.
Use the included test files as ready-to-run examples to understand each payment provider's request and response format before integrating.
Requires merchant credentials such as API keys and certificates from each payment provider before any payment call can be tested, even in sandbox mode.
GoPay is a Go programming library that lets developers add payment processing to their applications without writing all the low-level integration code from scratch. It covers a wide range of payment platforms popular in China and internationally, including WeChat Pay, Alipay, QQ Pay, Allinpay, Lakala, PayPal, and Apple payment verification. The library works by providing a client for each payment provider. A developer creates a client configured with their merchant credentials, then calls methods on that client to initiate payments, query order status, handle refunds, and perform other payment-related operations. Each payment provider has its own documentation section in the project, linked from the README rather than embedded directly. WeChat Pay and Alipay each have two supported versions, V2 and V3. The README marks V2 as not recommended, so new projects should use the V3 interfaces. The project includes test files for each payment provider that double as usage examples, showing how to construct requests and handle responses. There is also a separate example project called gopay-platform that demonstrates a more complete integration. GoPay supports custom log output by calling a method on the client after initialization, passing in any logger that implements the required interface. This makes it easier to plug into existing application logging systems. The library requires Go 1.24 or newer and is released under the Apache 2.0 license. The README is written primarily in Chinese and is aimed at developers integrating Chinese payment systems into Go-based backends. The project notes that a 1-cent test transaction is the recommended approach when testing payment flows during development.
← go-pay on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.