Skip to main content

Go SDK

Go SDK

basistheory-go

Installation

go get github.com/Basis-Theory/basistheory-go/v5

Initialization

package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v5"
)

func main() {
configuration := basistheory.NewConfiguration()
apiClient := basistheory.NewAPIClient(configuration)
contextWithAPIKey := context.WithValue(context.Background(), basistheory.ContextAPIKeys, map[string]basistheory.APIKey{
"ApiKey": {Key: "<API_KEY>"},
})
}