Plaid Proxy API

The proxy server is designed to seamlessly integrate with Plaid by appending Plaid tokens to requests. It combines our API URL with the desired Plaid endpoint path, ensuring accurate routing and token insertion. Send any request (GET, POST, etc.) to this proxy, which will forward to Plaid with the necessary credentials and borrower-specific configuration.

Overview

This API serves as a proxy for routing requests to Plaid, enabling seamless integration for clients using the Plaid Link element within the Standard Borrower Portal. It simplifies the process of managing Plaid tokens and securely appending them to your Plaid API requests.

Key Points:

  1. Who needs this API?
    This proxy is specifically designed for clients utilizing the Plaid Link feature in the Standard Borrower Portal.

  2. How does it work?

    • Combine your proxy API URL with the desired Plaid API path.
    • The server fetches the required Plaid tokens using theborrowerId and populating token in the request body.
    • The request is then securely forwarded to Plaid with the appropriate credentials.
  3. Supported Methods:
    This proxy supports all HTTP request methods, including GET, POST, PUT, and DELETE, for maximum flexibility in interacting with Plaid.


Explanation of the URL Structure

URL PartDescription
https://api.cloud.digifi.ioDigiFi’s API Base URL.
plaidSpecifies that the request is for Plaid integrations.
sandbox (or production)Indicates the Plaid environment: sandbox or production.
{endpoint_path}Placeholder for the specific Plaid API endpoint being accessed (e.g., auth/get, transactions/get).
`?borrowerId=Query parameter that uses the borrower’s unique ID to access the corresponding access_token (user_token).

Explanation of the Request Body Structure

The request body sent to this proxy must fully match the body structure required by Plaid’s API, as documented in Plaid’s official documentation. This ensures compatibility and proper forwarding of the request to Plaid.

Exception

The only exception is that the user_token, access_token, or acess_tokens fields can be left as empty strings (""). During the proxying process, the server will automatically retrieve and populate these tokens based on the provided borrowerId.

Example Request Body

{
  "client_id": "clientId",
  "secret": "secret",
  "access_token": ""
}

In this example, the access_token is left empty, and the proxy will fetch and insert the correct token during the request forwarding to Plaid.


Tokens Automatically Populated by the Proxy

The proxy server can automatically populate the following tokens during the request forwarding process:

  • access_token:
    Will be filled in as a single string value, e.g., "access_token_value".

  • user_token:
    Will also be filled in as a single string value, e.g., "user_token_value".

  • access_tokens:
    Will be populated as an array containing a single token, e.g., ["access_token_value"].

This automatic token filling ensures compatibility with Plaid’s API requirements while simplifying token management for clients.

Note: To retrieve the token, the borrower must complete the Plaid Link flow through the Standard Borrower Portal.


Example Request to Plaid auth/get Endpoint via Proxy

Below is an example of how to request the Plaid auth/get endpoint using the proxy server. The proxy will automatically handle the access_token population.

Request

POST https://api.cloud.digifi.io/plaid/sandbox/auth/get?borrowerId=12345
Content-Type: application/json
{
  "client_id": "your_client_id",
  "secret": "your_secret",
  "access_token": ""
}

Proxy Behavior

The proxy retrieves the access_token associated with the borrowerId (12345 in this example).
The request is forwarded to the Plaid auth/get endpoint with the populated access_token:

POST https://sandbox.plaid.com/auth/get
Content-Type: application/json
{
  "client_id": "your_client_id",
  "secret": "your_secret",
  "access_token": "retrieved_access_token"
}