A Go wrapper for the Dwolla API V2
- Go v1.11+ (uses modules)
go get -u github.com/kolanos/dwolla-v2-go
To instantiate the client:
package main
import (
"context"
"fmt"
"github.com/kolanos/dwolla-v2-go"
)
var ctx = context.Background()
func main() {
client := dwolla.New("<your dwolla key here>", "<your dwolla secret here>", dwolla.Production)
# Or if using the Dwolla sandbox
#client := dwolla.New("<your dwolla key here>", "<your dwolla secret here>", dwolla.Sandbox)
}
To retrieve dwolla account information:
res, err := client.Account.Retrieve(ctx)
if err != nil {
fmt.Println("Error:", err)
return err
}
fmt.Println("Account ID:", res.ID)
fmt.Println("Account Name:", res.Name)
See the GoDoc for the full API.
MIT License