Go SDK

Hay cuatro SDK: Node.js, Java, PHP y Go, con parámetros API, firmas, cuerpos JSON y verificación de callbacks consistentes.

Descarga el ZIP de tu lenguaje. Cada paquete incluye instrucciones de instalación, cliente, herramientas de firma y ejemplos.

Go SDK

Cliente Go de biblioteca estándar con cuatro métodos API, firma, verificación de callbacks y ejemplo de consulta de solo lectura.

Características
  • Incluye CreatePayinOrder, GetPayinOrder, CreateExclusiveBinding y CreatePayoutOrder
  • El éxito devuelve JSON de negocio original. Maneja por separado errores JSON y rechazos HTTP sin cuerpo.
  • Verifica callbacks con la API Key del pedido original y los bytes originales del cuerpo.
Instalación
cd uugate-go-sdk
go test ./...
go run ./examples/basic
Ejemplo rápido
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) }
_ = order