# go-pay/gopay

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/go-pay-gopay).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

5,632 stars · 930 forks · Go · Apache-2.0

## Links

- GitHub: https://github.com/go-pay/gopay
- Homepage: https://github.com/go-pay/gopay
- awesome-repositories: https://awesome-repositories.com/repository/go-pay-gopay.md

## Topics

`alipay` `allinpay` `apple` `golang` `gopay` `lakala` `pay` `paypal` `saobei` `wechat` `weixin`

## Description

GoPay is a Go SDK that aggregates multiple Chinese and international payment gateways behind a single, unified interface. It provides a consistent API for creating payment orders, processing refunds, handling asynchronous gateway callbacks, and querying transaction statuses across providers like Alipay and WeChat Pay.

The SDK abstracts away the differences between individual payment gateways through a gateway-agnostic interface, with built-in callback signature verification, error-code normalization, and request-response serialization. It includes dedicated client factories for each payment provider, using Go struct tags to map SDK fields to gateway-specific parameters at runtime.

Beyond core payment operations, GoPay supports retrieving user identifiers via OAuth authorization code exchange, generating mini-program payment parameters, and downloading settlement reports for reconciliation. The library handles the full payment order lifecycle, from creation through refund processing and status tracking, with consistent Go types and error handling across all supported gateways.

## Tags

### Business & Productivity Software

- [Payment Gateways](https://awesome-repositories.com/f/business-productivity-software/payment-gateways.md) — Integrates multiple Chinese and international payment gateways through a single Go SDK, handling order creation, callbacks, and refunds uniformly.
- [Alipay Integrations](https://awesome-repositories.com/f/business-productivity-software/online-payment-processing/alipay-integrations.md) — Handles Alipay payment flows such as order creation, callback verification, and refunds using Go code.
- [Callback Handlers](https://awesome-repositories.com/f/business-productivity-software/payment-gateways/callback-handlers.md) — Receives, validates, and responds to asynchronous payment notifications from various gateways in a Go service.
- [Callback Parsers](https://awesome-repositories.com/f/business-productivity-software/payment-gateways/callback-parsers.md) — Decodes and unmarshals asynchronous payment notifications from gateways into structured Go types. ([source](https://github.com/go-pay/gopay/tree/main/docs/))
- [Multi-Provider SDKs](https://awesome-repositories.com/f/business-productivity-software/payment-gateways/multi-provider-sdks.md) — An SDK that unifies WeChat Pay, Alipay, and other Chinese payment gateways under a single Go interface for order creation, refunds, and callback handling.
- [WeChat Pay Integrations](https://awesome-repositories.com/f/business-productivity-software/payment-integrations/wechat-pay-integrations.md) — Implements WeChat Pay payment, refund, and notification verification APIs for server-side Go integration.
- [Multi-Provider Payment Aggregations](https://awesome-repositories.com/f/business-productivity-software/payment-integrations/wechat-pay-integrations/multi-provider-payment-aggregations.md) — A Go SDK that abstracts multiple Chinese payment providers behind a common API for creating orders, processing refunds, and handling gateway callbacks.
- [Payment Order Management](https://awesome-repositories.com/f/business-productivity-software/payment-order-management.md) — Creates, queries, and reconciles payment orders across multiple gateways with consistent Go types and error handling.
- [Order Creation Requests](https://awesome-repositories.com/f/business-productivity-software/payment-order-management/order-creation-requests.md) — Initiates payment requests to supported gateways, returning prepay IDs or order data for client-side checkout. ([source](https://github.com/go-pay/gopay/tree/main/docs/))
- [Transaction Status Queries](https://awesome-repositories.com/f/business-productivity-software/payment-order-management/order-status-polling-mechanisms/transaction-status-queries.md) — Retrieves the current state of a payment order from the gateway, such as success, failure, or pending. ([source](https://github.com/go-pay/gopay/tree/main/docs/))
- [Refund Processing Engines](https://awesome-repositories.com/f/business-productivity-software/refund-processing-engines.md) — Issues full or partial refunds across supported payment gateways and tracks refund status from a single Go interface.
- [Refund Request Senders](https://awesome-repositories.com/f/business-productivity-software/refund-processing-engines/refund-request-senders.md) — Sends refund requests for completed transactions and tracks refund status through the gateway. ([source](https://github.com/go-pay/gopay/tree/main/docs/))
- [Order Status Queries](https://awesome-repositories.com/f/business-productivity-software/payment-order-management/order-status-queries.md) — Queries the current status and details of payment orders using transaction identifiers. ([source](https://cdn.jsdelivr.net/gh/go-pay/gopay@main/README.md))

### Data & Databases

- [Payment Transaction Callbacks](https://awesome-repositories.com/f/data-databases/database-transactions/retriable-transactions/transaction-status-inspectors/transaction-callback-registrations/payment-transaction-callbacks.md) — Receives and validates asynchronous payment notifications from gateways, responding with success or failure acknowledgments. ([source](https://cdn.jsdelivr.net/gh/go-pay/gopay@main/README.md))

### Security & Cryptography

- [Webhook Signature Verifiers](https://awesome-repositories.com/f/security-cryptography/cryptographic-signature-verification/alternative-signature-verifiers/webhook-signature-verifiers.md) — Validates incoming webhook payloads by recomputing HMAC or RSA signatures before dispatching to user code.
- [Payment Signature Verification](https://awesome-repositories.com/f/security-cryptography/payment-signature-verification.md) — Validates cryptographic signatures on incoming gateway callbacks to confirm payment notification authenticity. ([source](https://github.com/go-pay/gopay/tree/main/docs/))

### Software Engineering & Architecture

- [Payment Gateway Abstractions](https://awesome-repositories.com/f/software-engineering-architecture/framework-agnostic-interfaces/payment-gateway-abstractions.md) — Defines a unified Go interface that wraps multiple payment gateways behind a single method contract.
- [Struct Tag Mapping Utilities](https://awesome-repositories.com/f/software-engineering-architecture/metadata-attachments/struct-tags/struct-tag-mapping-utilities.md) — Uses Go struct tags to map SDK fields to gateway-specific request parameters at runtime.

### Part of an Awesome List

- [Payment Parameter Generators](https://awesome-repositories.com/f/awesome-lists/devtools/mini-program-development/payment-parameter-generators.md) — Generates the signed parameters required to start a payment from a mini-program front end. ([source](https://cdn.jsdelivr.net/gh/go-pay/gopay@main/README.md))

### Web Development

- [Gateway Error Code Translators](https://awesome-repositories.com/f/web-development/error-handling/error-code-hierarchies/gateway-error-code-translators.md) — Translates diverse gateway error codes into a consistent set of Go error types for unified handling.
- [Gateway Format Serializers](https://awesome-repositories.com/f/web-development/request-body-deserializers/request-and-response-transformers/gateway-format-serializers.md) — Converts Go structs to gateway-native formats (JSON/XML) and back, handling field naming and nesting differences.
- [Payment Client Factories](https://awesome-repositories.com/f/web-development/web-framework-integrations/mock-client-integrations/mock-client-factories/payment-client-factories.md) — Creates isolated client instances per payment provider, each with its own endpoint, key, and serialization logic.
