plaid-go

command module
v0.0.0-...-f892ad0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 5 Imported by: 0

README

plaid-go CircleCI GoDoc

A Go client library for the Plaid API.

Table of Contents

Install

$ go get github.com/plaid/plaid-go

Versioning

Each major version of plaid-go targets a specific version of the Plaid API:

API version plaid-go release
2020-09-14 (latest) 7.x.x
2019-05-29 (latest) 2.x.x
2018-05-22 1.x.x
2017-03-08 not supported

For information about what has changed between versions and how to update your integration, head to the version changelog.

Documentation

The module supports all Plaid API endpoints.

GoDoc: GoDoc

Getting Started

Calling Endpoints

To call an endpoint you must create a Client object.

import (
    "net/http"
    "os"

    "github.com/plaid/plaid-go/plaid"
)

clientOptions := plaid.ClientOptions{
    os.Getenv("PLAID_CLIENT_ID"),
    os.Getenv("PLAID_SECRET"),
    plaid.Sandbox, // Available environments are Sandbox, Development, and Production
    &http.Client{}, // This parameter is optional
}
client, err := plaid.NewClient(clientOptions)

Each endpoint returns an object which contains the parsed JSON from the HTTP response.

Errors

All non-200 responses will return a plaid.Error instance.

For more information on Plaid response codes, head to the docs.

Developing

  1. Download this repo into your Go source directory
  2. Run make setup pull down all dependencies etc
Tests

To run the tests you'll need to sign up for a Sandbox account on https://plaid.com as they perform real API requests.

Once you have these you can run make test, passing your Sandbox credentials as environment variables:

PLAID_CLIENT_ID=aabbcc PLAID_PUBLIC_KEY=ddeeff PLAID_SECRET=ffeedd make test

Support

Open an issue!

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package internal holds logic internal to the plaid-go implementation and should not be imported from outside of the plaid-go package.
Package internal holds logic internal to the plaid-go implementation and should not be imported from outside of the plaid-go package.
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL