This package allows integrating your Golang application with Gocardless Pro
Standard go get:
go get github.com/epigos/gocardless-go
- Customers
- Customer Bank Accounts
- Mandates
- Payments
Create a Client instance, providing your access token and the environment you want to use:
package main
import (
"fmt"
"os"
gocardless "github.com/epigos/gocardless-go"
)
func main() {
token := os.Getenv("GOCARDLESS_ACCESS_TOKEN")
client := gocardless.NewClient(token, gocardless.SandboxEnvironment)
// get customers
res, err := client.GetCustomers()
for _, c := range res.Customers {
fmt.Println(c)
}
}
- For full usage and examples see the Godoc
- Gocardless Pro API reference