Go SDK
The official Go client — typed requests and responses generated from the OpenAPI spec, plus a webhook signature verifier.
Getting it
The Go SDK lives at github.com/403ent/transmute/sdk/go. Access to the module is provided during onboarding — contact support if go get can't resolve it yet.
go get github.com/403ent/transmute/sdk/go
Convert a message
package main
import (
"context"
"fmt"
"os"
transmute "github.com/403ent/transmute/sdk/go"
)
func main() {
client, err := transmute.New(
"https://api.transmute.403fin.io",
transmute.WithAPIKey(os.Getenv("TRANSMUTE_KEY")),
)
if err != nil {
panic(err)
}
resp, err := client.Convert(context.Background(), transmute.ConvertRequest{
To: "camt.053",
Message: mt940Text, // raw MT; From omitted → auto-detect
})
if err != nil {
panic(err) // API errors carry the problem+json details
}
fmt.Println(resp.Meta.DetectedType) // "mt940"
for _, w := range resp.Warnings {
fmt.Printf("%s (%s): %s
", w.Code, w.Severity, w.Detail)
}
}
transmute.WithToken(...) authenticates with an OAuth access token instead of an API key; transmute.WithHTTPDoer(...) injects your own http.Client (proxies, custom timeouts).
Verify a webhook delivery
err := transmute.VerifyWebhookSignature(
endpointSecret, // "whsec_..." — the full string
r.Header.Get("X-Transmute-Signature"), // "t=...,v1=..."
rawBody, // raw bytes, read before parsing
5*time.Minute, // timestamp tolerance
)
Constant-time comparison and the replay-window check are built in — see Webhooks for the delivery contract.
Notes
- The client is generated from the same OpenAPI document that serves api.transmute.403fin.io/docs; a CI gate keeps them in lockstep.
- Amount fields are strings in all response types — parse with a decimal library, never
float64. - Errors deserialize the RFC 9457 problem body, including the
typeslug from the error catalog.
Was this page helpful?