Go client for Gocardless Pro API
This package allows integrating your Golang application with Gocardless Pro
Installation
Standard go get:
go get github.com/epigos/gocardless-go
Coverage
- Customers
- Customer Bank Accounts
- Mandates
- Payments
Usage
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)
}
}
Documentation
- For full usage and examples see the Godoc
- Gocardless Pro API reference