Go SDK
Go standard-library client with four API methods, request signing, callback verification and a read-only query example.
Highlights
- Includes CreatePayinOrder, GetPayinOrder, CreateExclusiveBinding and CreatePayoutOrder
- Success returns the raw business JSON. Handle ordinary JSON errors and HTTP denials with empty bodies separately.
- Verify callbacks using the original order API Key and raw request body bytes.
Install
cd uugate-go-sdk
go test ./...
go run ./examples/basicQuick Example
import (
"context"
"os"
uugate "uugate.local/openapi"
)
client, err := uugate.NewClient("https://api.uugate.com",
os.Getenv("UUGATE_MERCHANT_UID"), os.Getenv("UUGATE_API_KEY"))
if err != nil { panic(err) }
order, err := client.CreatePayinOrder(context.Background(), map[string]any{
"chainCode": "TRON", "tokenSymbol": "USDT",
"merchantOrderNo": "M202604170001", "amount": "100.00",
"notifyUrl": "https://merchant.example.com/api/uugate/payin-notify",
})
if err != nil { panic(err) }
_ = orderZIP Download
Download Go SDK ZIPuugate-go-sdk.zip