Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.36 KB

README.md

File metadata and controls

50 lines (35 loc) · 1.36 KB

Go client for Gocardless Pro API

Godoc Build Status Go Report Card

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