GithubHelp home page GithubHelp logo

morgangallant / plaid-cc Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 1.42 MB

C++ bindings for Plaid

Home Page: https://plaid.com/docs/

License: MIT License

C++ 97.25% Shell 0.74% Meson 2.01%
plaid plaid-api protobuf meson libcurl

plaid-cc's Introduction

plaid-cc

A C++ client library for the Plaid API.

Table of Contents

Introduction

As of January 13th, 2020, Plaid was acquired by Visa for a whopping $5.3 billion dollars. A few days later, Zach (the CEO and Co-Founder) of Plaid tweeted this:

... we are very much still hiring. We've just finished the prologue to the @Plaid journey. Join us for Chapter 1!

To me, this was pretty exciting. I've used Plaid in the past for personal projects, and I've followed Zach on Twitter for a good while now. The company has an incredible product... why? It's because they've built a road for so many other developers & entrepreneurs to securely interact with users bank accounts. The banking industry as a whole has been stuck in the past for a while now, and Plaid has been a pioneer in advancing this industry forward.

So... why did I build this library? Three reasons: giving back / contributing, the free t-shirt, and because Plaid doesn't have any job postings for summer interns. History has shown that underestimating enthusiastic sophomores is probably a bad idea (thanks Mark!), so if one of these students writes an entire client library in a single night, imagine what they could do in four months. And yes, I would love to be part of Chapter 1 of the Plaid journey!

On a side note, a possible fourth reason why I wanted to build this library was that I could see how effective Protocol Buffers were at JSON serialization/deserialization. Turns out, they're pretty good. The best part about using this type of approach is the portability, since protocol buffers can be compiled to a number of different languages. This way, a single protocol buffer file can act as a single point of truth for the entire api, which means that the effort of maintaining client libraries becomes significantly easier.

Install

This project uses the Meson Build system. To build and install it, simply do the following:

git clone [email protected]:MorganGallant/plaid-cc.git
cd plaid-cc
meson build
cd build
ninja install

This will copy all of the headers to your include path, copy the shared library file to your lib path, and add the library to your package config path.

Usage

After installation, usage should be really straightforward. This library was modelled after the plaid-go library, and the function names / usage should be close to identical.

#include <iostream>
#include <plaid/client.h>

int main() {
  // Create the client from a set of credentials.
  auto creds = plaid::Credentials(plaid::Enviroment::Sandbox, "client-id-here",
                                  "public-key-here", "secret-key-here");
  auto client = plaid::Client::Create(creds);

  // Do a test api call, say, get all categories.
  auto categories = client->GetCategories();
  if (!categories.IsOk()) {
    std::cerr << "Error: " << categories.DescribeStatus() << std::endl;
    return 1;
  }
  // In order to access the data, the categories response must be unwrapped.
  std::cout << "Got " << categories.Unwrap().categories_size() << "categories.";
  std::cout << std::endl;
}

One thing to note, the plaid::Client::Create(creds) call returns an std::unique_ptr<plaid::Client> object. This means that you do not have to explicitly cleanup the object once you are finished with it.

The library should support all current API methods, including the payments API added which was added yesterday to the payment library committed on Jan 17th (two days ago as of writing this).

Contributing

Contributions are welcome to this repository, especially those which ensure that the API methods are up to date. I'll try my best to monitor recent API changes, but I may not always be able to update the codebase instantly to reflect the new changes. At a minimum, I will try to reflect any changes to the plaid-go repository.

License

This project is under the MIT license, which was deliberately chosen to ensure that companies and programmers can use this library in their closed source software with no issues. Plaid is all about enabling people to do amazing things in the fintech industry, and my goal will always be to support those people.

plaid-cc's People

Contributors

morgangallant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.