IMPORTANT: This SDK is under heavy development and subject to breaking changes.
The Golang SDK for the SumUp API.
sumup-go
is compatible with projects using Go Modules.
Import the SDK using:
import (
"github.com/sumup/sumup-go"
)
And run any of go build
/go install
/go test
which will resolve the package automatically.
Alternatively, you can install the SDK using:
go get github.com/sumup/sumup-go
For complete documentation of SumUp APIs visit developer.sumup.com. Alternatively, refer to this simple example to get started:
package main
import (
"context"
"os"
"github.com/sumup/sumup-go"
)
func main() {
client := sumup.NewClient().WithAuth(os.Getenv("SUMUP_KEY"))
account, err := client.Merchant.GetAccount(context.Background(), sumup.GetAccountParams{})
if err != nil {
fmt.Printf("get merchant account: %s", err.Error())
return
}
fmt.Printf("authorized for merchant %q", *account.MerchantProfile.MerchantCode)
}
The easiest form of authenticating with SumUp APIs is using API keys. You can create API keys in the API key section of the developer portal. Store them securely and use them with:
client := sumup.NewClient().WithAuth(os.Getenv("SUMUP_KEY"))
Our APIs and their public offering is limited and under heavy development. If you have any questions or inquiries reach out to our support team via the Contact Form.
For question specifically related to this Golang SDK please use the Discussions or Open an Issue.
sumup-go
SDK will always support latest 3 version of golang following the Golang Release Policy.