SDKs
Go
The avetrust-go SDK — idiomatic Go client for the AveTrust API.
Install
go get github.com/avetrust/avetrust-goInitialize
import av "github.com/avetrust/avetrust-go"
c := av.New("sk_test_…") // sandbox inferred from the keyCreate, read, send
v, err := c.Verifications.Create(av.CreateParams{
Checks: []string{"DOCUMENT", "LIVENESS", "FACE_MATCH"},
CallbackURL: "https://your-app.example/kyc/webhook",
})
// v.ID, v.Token
result, err := c.Verifications.Result(v.ID)
err = c.Verifications.SendLink(v.ID, "EMAIL", "client@example.com",
"https://verify.avetrust.net/s/"+v.Token)Verify a webhook
event, err := c.Webhooks.ConstructEvent(
rawBody,
r.Header.Get("X-AveTrust-Signature"),
secret,
)