Processor token endpoints 
==========================

#### API reference for endpoints for use with Plaid partners 

Processor token endpoints are used to create tokens that are then sent to a Plaid partner for use in a Plaid integration. For a full list of integrations, see the [Plaid Dashboard](https://dashboard.plaid.com/developers/integrations) . For specific information on Auth integrations, see [Auth payment partners](https://plaid.com/docs/auth/partnerships/index.html.md) .

Are you a Plaid processor partner looking for API docs? The documentation on API endpoints for use by partners has moved to [Processor partner endpoints](https://plaid.com/docs/api/processor-partners/index.html.md) .

| In this section |  |
| --- | --- |
| [/processor/token/create](https://plaid.com/docs/api/processors/index.html.md#processortokencreate) | Create a processor token |
| [/processor/stripe/bank\_account\_token/create](https://plaid.com/docs/api/processors/index.html.md#processorstripebank_account_tokencreate) | Create a bank account token for use with Stripe |
| [/processor/token/permissions/set](https://plaid.com/docs/api/processors/index.html.md#processortokenpermissionsset) | Set product permissions for a processor token |
| [/processor/token/permissions/get](https://plaid.com/docs/api/processors/index.html.md#processortokenpermissionsget) | Get product permissions for a processor token |

| See also |  |
| --- | --- |
| [/sandbox/processor\_token/create](https://plaid.com/docs/api/sandbox/index.html.md#sandboxprocessor_tokencreate) | Create a test Item and processor token (Sandbox only) |

\=\*=\*=\*=

#### /processor/token/create 

#### Create processor token 

Used to create a token suitable for sending to one of Plaid's partners to enable integrations. Note that Stripe partnerships use bank account tokens instead; see [/processor/stripe/bank\_account\_token/create](https://plaid.com/docs/api/processors/index.html.md#processorstripebank_account_tokencreate) for creating tokens for use with Stripe integrations. If using multiple processors, multiple different processor tokens can be created for a single access token. Once created, a processor token for a given Item can be modified by calling [/processor/token/permissions/set](https://plaid.com/docs/api/processors/index.html.md#processortokenpermissionsset) . To revoke the processor's access, the entire Item must be deleted by calling [/item/remove](https://plaid.com/docs/api/items/index.html.md#itemremove) .

#### Request fields 

string

Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

string

Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

required, string

The access token associated with the Item for which data is being requested.

required, string

The `account_id` value obtained from the `onSuccess` callback in Link

required, string

The processor you are integrating with.

Possible values: `dwolla`, `galileo`, `modern_treasury`, `ocrolus`, `vesta`, `drivewealth`, `vopay`, `achq`, `check`, `checkbook`, `circle`, `sila_money`, `rize`, `svb_api`, `unit`, `wyre`, `lithic`, `alpaca`, `astra`, `moov`, `treasury_prime`, `marqeta`, `checkout`, `solid`, `highnote`, `gemini`, `apex_clearing`, `gusto`, `adyen`, `atomic`, `i2c`, `wepay`, `riskified`, `utb`, `adp_roll`, `fortress_trust`, `bond`, `bakkt`, `teal`, `zero_hash`, `taba_pay`, `knot`, `sardine`, `alloy`, `finix`, `nuvei`, `layer`, `boom`, `paynote`, `stake`, `wedbush`, `esusu`, `ansa`, `scribeup`, `straddle`, `loanpro`, `bloom_credit`, `sfox`, `brale`, `parafin`, `cardless`, `open_ledger`, `valon`, `gainbridge`, `cardlytics`, `pinwheel`, `thread_bank`, `array`, `fiant`, `oatfi`, `curinos`, `frame`, `interchecks`, `interchange`

```bash
# Exchange the public token from Plaid Link for an access token.
curl \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "${PLAID_CLIENT_ID}",
    "secret": "${PLAID_SECRET}",
    "public_token": "${PUBLIC_TOKEN}"
  }' \
  -X POST \
  https://sandbox.plaid.com/item/public_token/exchange

# Create a processor token for a specific account id.
curl \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "${PLAID_CLIENT_ID}",
    "secret": "${PLAID_SECRET}",
    "access_token": "${ACCESS_TOKEN}",
    "account_id": "${ACCOUNT_ID}",
    "processor": "dwolla"
  }' \
  -X POST \
  https://sandbox.plaid.com/processor/token/create

```

```java
import com.plaid.client.model.ItemPublicTokenExchangeRequest;
import com.plaid.client.model.ItemPublicTokenExchangeResponse;
import com.plaid.client.model.ProcessorTokenCreateRequest;
import com.plaid.client.model.ProcessorTokenCreateResponse;

// Change sandbox to production when you're ready to go live!
HashMap apiKeys = new HashMap();
apiKeys.put("clientId", plaidClientId);
apiKeys.put("secret", plaidSecret);
apiKeys.put("plaidVersion", "2020-09-14");
apiClient = new ApiClient(apiKeys);
apiClient.setPlaidAdapter(ApiClient.Sandbox);

plaidClient = apiClient.createService(PlaidApi.class);

// Exchange the public token from Plaid Link for an access token.
ItemPublicTokenExchangeRequest request = new ItemPublicTokenExchangeRequest()
  .publicToken(publicToken);

Response exchangeResponse = client()
  .itemPublicTokenExchange(request)
  .execute();

// Create a processor token for a specific account id.
if (exchangeResponse.isSuccessful()) {
  String accessToken = exchangeResponse.body().getAccessToken();
  ProcessorTokenCreateRequest request = new ProcessorTokenCreateRequest()
    .accessToken(accessToken)
    .processor("dwolla")
    .accountId(accountID);

  Response dwollaResponse = client()
    .processorTokenCreate(request)
    .execute();

    if (dwollaResponse.isSuccessful()) {
      String dwollaProcessorToken = dwollaResponse.body().getProcessorToken();
    }
}

```

```ruby
require 'plaid'

# Change sandbox to production when you're ready to go live!
configuration = Plaid::Configuration.new
configuration.server_index = Plaid::Configuration::Environment[ENV['PLAID_ENV'] || 'sandbox']
configuration.api_key['PLAID-CLIENT-ID'] = ENV['PLAID_CLIENT_ID']
configuration.api_key['PLAID-SECRET'] = ENV['PLAID_SECRET']
configuration.api_key['Plaid-Version'] = '2020-09-14'

api_client = Plaid::ApiClient.new(
  configuration
)

client = Plaid::PlaidApi.new(api_client)

# Exchange the public token from Plaid Link for an access token.
item_public_token_exchange_request = Plaid::ItemPublicTokenExchangeRequest.new(
  {
    public_token: public_token
  }
)
exchange_token_response = client.item_public_token_exchange(item_public_token_exchange_request)
access_token = exchange_token_response.access_token

# Create a processor token for a specific account id.
processor_token_create_request = Plaid::ProcessorTokenCreateRequest.new(
  {
    access_token: access_token,
    account_id: account_id,
    processor: "dwolla"
  }
)
create_response = client.processor_token_create(processor_token_create_request)
processor_token = create_response.processor_token

```

```python
import plaid
from plaid.api import plaid_api
from plaid.model.item_public_token_exchange_request import ItemPublicTokenExchangeRequest
from plaid.model.processor_token_create_request import ProcessorTokenCreateRequest

# Change sandbox to production when you're ready to go live!
configuration = plaid.Configuration(
    host=plaid.Environment.Sandbox,
    api_key={
        'clientId': PLAID_CLIENT_ID,
        'secret': PLAID_SECRET,
        'plaidVersion': '2020-09-14'
    }
)
api_client = plaid.ApiClient(configuration)
client = plaid_api.PlaidApi(api_client)

# Exchange the public token from Plaid Link for an access token.
exchange_request = ItemPublicTokenExchangeRequest(public_token=public_token)
exchange_token_response = client.item_public_token_exchange(exchange_request)
access_token = exchange_token_response['access_token']

# Create a processor token for a specific account id.
create_request = ProcessorTokenCreateRequest(
    access_token=access_token,
    account_id=account_id,
    processor='dwolla'
)
create_response = client.processor_token_create(create_request)
processor_token = create_response['processor_token']

```

```node
const {
  Configuration,
  PlaidApi,
  PlaidEnvironments,
  ProcessorTokenCreateRequest,
} = require('plaid');
// Change sandbox to production when you're ready to go live!
const configuration = new Configuration({
  basePath: PlaidEnvironments.sandbox,
  baseOptions: {
    headers: {
      'PLAID-CLIENT-ID': process.env.PLAID_CLIENT_ID,
      'PLAID-SECRET': process.env.PLAID_SECRET,
      'Plaid-Version': '2020-09-14',
    },
  },
});

const plaidClient = new PlaidApi(configuration);

try {
  // Exchange the public_token from Plaid Link for an access token.
  const tokenResponse = await plaidClient.itemPublicTokenExchange({
    public_token: PUBLIC_TOKEN,
  });
  const accessToken = tokenResponse.data.access_token;

  // Create a processor token for a specific account id.
  const request: ProcessorTokenCreateRequest = {
    access_token: accessToken,
    account_id: accountID,
    processor: 'dwolla',
  };
  const processorTokenResponse = await plaidClient.processorTokenCreate(
    request,
  );
  const processorToken = processorTokenResponse.data.processor_token;
} catch (error) {
  // handle error
}

```

```go
import (
    "context"
    "os"

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

configuration := plaid.NewConfiguration()
configuration.AddDefaultHeader("PLAID-CLIENT-ID", os.Getenv("CLIENT_ID"))
configuration.AddDefaultHeader("PLAID-SECRET", os.Getenv("SECRET"))
configuration.UseEnvironment(plaid.Sandbox)

client := plaid.NewAPIClient(configuration)
ctx := context.Background()

// If not testing in Sandbox, remove these four lines and instead use a publicToken obtained from Link
sandboxInstitution := "ins_109508"
testProducts := []string{"auth"}
sandboxPublicTokenResp, _, err := client.PlaidApi.SandboxPublicTokenCreate(ctx).SandboxPublicTokenCreateRequest(
  *plaid.NewSandboxPublicTokenCreateRequest(
    sandboxInstitution,
    testProducts,
  ),
).Execute()
publicToken := sandboxPublicTokenResp.GetPublicToken()

// Exchange the publicToken for an accessToken
exchangePublicTokenResp, _, err := client.PlaidApi.ItemPublicTokenExchange(ctx).ItemPublicTokenExchangeRequest(
  *plaid.NewItemPublicTokenExchangeRequest(publicToken),
).Execute()
accessToken := exchangePublicTokenResp.GetAccessToken()

// Get Accounts
accountsGetResp, _, err := client.PlaidApi.AccountsGet(ctx).AccountsGetRequest(
  *plaid.NewAccountsGetRequest(accessToken),
).Execute()
accountID := accountsGetResp.GetAccounts()[0].GetAccountId()

// Create processor token
processorTokenCreateResp, _, err := client.PlaidApi.ProcessorTokenCreate(ctx).ProcessorTokenCreateRequest(
  *plaid.NewProcessorTokenCreateRequest(accessToken, accountID, "dwolla"),
).Execute()

```

#### Response fields 

string

The `processor_token` that can then be used by the Plaid partner to make API requests

string

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Response Object

```json
{
  "processor_token": "processor-sandbox-0asd1-a92nc",
  "request_id": "xrQNYZ7Zoh6R7gV"
}
```

\=\*=\*=\*=

#### /processor/token/permissions/set 

#### Control a processor's access to products 

Used to control a processor's access to products on the given processor token. By default, a processor will have access to all available products on the corresponding item. To restrict access to a particular set of products, call this endpoint with the desired products. To restore access to all available products, call this endpoint with an empty list. This endpoint can be called multiple times as your needs and your processor's needs change.

#### Request fields 

string

Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

string

Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

required, string

The processor token obtained from the Plaid integration partner. Processor tokens are in the format: `processor-<environment>-<identifier>`

required, \[string\]

A list of products the processor token should have access to. An empty list will grant access to all products.

Possible values: `assets`, `auth`, `balance`, `balance_plus`, `beacon`, `identity`, `identity_match`, `investments`, `investments_auth`, `liabilities`, `payment_initiation`, `identity_verification`, `transactions`, `credit_details`, `income`, `income_verification`, `standing_orders`, `transfer`, `employment`, `recurring_transactions`, `transactions_refresh`, `signal`, `statements`, `processor_payments`, `processor_identity`, `profile`, `cra_base_report`, `cra_income_insights`, `cra_partner_insights`, `cra_network_insights`, `cra_cashflow_insights`, `cra_monitoring`, `cra_lend_score`, `cra_plaid_credit_score`, `layer`, `pay_by_bank`, `protect_linked_bank`, `protect_transactions`

```bash
curl \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "${PLAID_CLIENT_ID}",
    "secret": "${PLAID_SECRET}",
    "processor_token": "${PROCESSOR_TOKEN}",
    "products": ["auth", "balance", "identity"]
  }' \
  -X POST \
  https://sandbox.plaid.com/processor/token/permissions/set

```

```java
  ProcessorTokenPermissionsSetRequest request = new ProcessorTokenPermissionsSetRequest()
    .processorToken(processorToken)
    .products(products); // List

  Response response = client()
    .processorTokenPermissionsSet(request)
    .execute();

```

```ruby
processor_token_permissions_set_request = Plaid::ProcessorTokenPermissionsSetRequest.new(
  {
    processor_token: processor_token,
    products: products
  }
)
response = client.processor_token_permissions_set(processor_token_permissions_set_request)

```

```python
request = ProcessorTokenPermissionsSetRequest(
    processor_token=processor_token,
    products=products # [Products]
)
response = client.processor_token_permissions_set(request)

```

```node
try {
  const request: ProcessorTokenPermissionsSetRequest = {
    processor_token: processorToken,
    products: ['auth', 'balance', 'identity'],
  };
  const response = await plaidClient.processorTokenPermissionsSet(request);
} catch (error) {
  // handle error
}

```

```go
processorTokenPermissionsSetResp, _, err := client.PlaidApi.ProcessorTokenPermissionsSet(ctx).ProcessorTokenPermissionsSetRequest(
  *plaid.NewProcessorTokenPermissionsSetRequest(processorToken, products),
).Execute()

```

#### Response fields 

string

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Response Object

```json
{
  "request_id": "xrQNYZ7Zoh6R7gV"
}
```

\=\*=\*=\*=

#### /processor/token/permissions/get 

#### Get a processor token's product permissions 

Used to get a processor token's product permissions. The `products` field will be an empty list if the processor can access all available products.

#### Request fields 

string

Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

string

Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

required, string

The processor token obtained from the Plaid integration partner. Processor tokens are in the format: `processor-<environment>-<identifier>`

```bash
curl \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "${PLAID_CLIENT_ID}",
    "secret": "${PLAID_SECRET}",
    "processor_token": "${PROCESSOR_TOKEN}"
  }' \
  -X POST \
  https://sandbox.plaid.com/processor/token/permissions/get

```

```java
  ProcessorTokenPermissionsGetRequest request = new ProcessorTokenPermissionsGetRequest()
    .processorToken(processorToken);

  Response response = client()
    .processorTokenPermissionsGet(request)
    .execute();

  List products = response.body().getProducts();

```

```ruby
processor_token_permissions_get_request = Plaid::ProcessorTokenPermissionsGetRequest.new(
  {
    processor_token: processor_token,
  }
)
response = client.processor_token_permissions_get(processor_token_permissions_get_request)
products = response.products

```

```python
request = ProcessorTokenPermissionsGetRequest(
    processor_token=processor_token,
)
response = client.processor_token_permissions_get(request)
products = response['products']

```

```node
try {
  const request: ProcessorTokenPermissionsGetRequest = {
    processor_token: processorToken,
  };
  const response = await plaidClient.processorTokenPermissionsGet(request);
  const products = response.data.products;
} catch (error) {
  // handle error
}

```

```go
processorTokenPermissionsGetResp, _, err := client.PlaidApi.ProcessorTokenPermissionsGet(ctx).ProcessorTokenPermissionsGetRequest(
  *plaid.NewProcessorTokenPermissionsGetRequest(processorToken),
).Execute()

```

#### Response fields 

string

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

\[string\]

A list of products the processor token should have access to. An empty list means that the processor has access to all available products, including future products.

Possible values: `assets`, `auth`, `balance`, `balance_plus`, `beacon`, `identity`, `identity_match`, `investments`, `investments_auth`, `liabilities`, `payment_initiation`, `identity_verification`, `transactions`, `credit_details`, `income`, `income_verification`, `standing_orders`, `transfer`, `employment`, `recurring_transactions`, `transactions_refresh`, `signal`, `statements`, `processor_payments`, `processor_identity`, `profile`, `cra_base_report`, `cra_income_insights`, `cra_partner_insights`, `cra_network_insights`, `cra_cashflow_insights`, `cra_monitoring`, `cra_lend_score`, `cra_plaid_credit_score`, `layer`, `pay_by_bank`, `protect_linked_bank`, `protect_transactions`

Response Object

```json
{
  "request_id": "xrQNYZ7Zoh6R7gV",
  "products": [
    "auth",
    "balance",
    "identity"
  ]
}
```

\=\*=\*=\*=

#### /processor/stripe/bank\_account\_token/create 

#### Create Stripe bank account token 

Used to create a token suitable for sending to Stripe to enable Plaid-Stripe integrations. For a detailed guide on integrating Stripe, see [Add Stripe to your app](https://plaid.com/docs/auth/partnerships/stripe/index.html.md) .

Note that the Stripe bank account token is a one-time use token. To store bank account information for later use, you can use a Stripe customer object and create an associated bank account from the token, or you can use a Stripe Custom account and create an associated external bank account from the token. This bank account information should work indefinitely, unless the user's bank account information changes or they revoke Plaid's permissions to access their account. Stripe bank account information cannot be modified once the bank account token has been created. If you ever need to change the bank account details used by Stripe for a specific customer, have the user go through Link again and create a new bank account token from the new `access_token`.

To revoke a bank account token, the entire underlying access token must be revoked using [/item/remove](https://plaid.com/docs/api/items/index.html.md#itemremove) .

#### Request fields 

string

Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

string

Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

required, string

The access token associated with the Item for which data is being requested.

required, string

The `account_id` value obtained from the `onSuccess` callback in Link

```node
// Change sandbox to production when you're ready to go live!
const {
  Configuration,
  PlaidApi,
  PlaidEnvironments,
  ProcessorStripeBankAccountTokenCreateRequest,
} = require('plaid');
const configuration = new Configuration({
  basePath: PlaidEnvironments[process.env.PLAID_ENV],
  baseOptions: {
    headers: {
      'PLAID-CLIENT-ID': process.env.PLAID_CLIENT_ID,
      'PLAID-SECRET': process.env.PLAID_SECRET,
      'Plaid-Version': '2020-09-14',
    },
  },
});

const plaidClient = new PlaidApi(configuration);

try {
  // Exchange the public_token from Plaid Link for an access token.
  const tokenResponse = await plaidClient.itemPublicTokenExchange({
    public_token: PUBLIC_TOKEN,
  });
  const accessToken = tokenResponse.data.access_token;

  // Generate a bank account token
  const request: ProcessorStripeBankAccountTokenCreateRequest = {
    access_token: accessToken,
    account_id: accountID,
  };
  const stripeTokenResponse = await plaidClient.processorStripeBankAccountTokenCreate(
    request,
  );
  const bankAccountToken = stripeTokenResponse.data.stripe_bank_account_token;
} catch (error) {
  // handle error
}

```

```bash
# Exchange token
curl -X POST https://sandbox.plaid.com/item/public_token/exchange \
-H 'Content-Type: application/json' \
-d '{
  "client_id": "${PLAID_CLIENT_ID}",
  "secret": "${PLAID_SECRET}",
  "public_token": "${PUBLIC_TOKEN}"
}'

# Create bank account token
curl -X POST https://sandbox.plaid.com/processor/stripe/bank_account_token/create \
-H 'Content-Type: application/json' \
-d '{
  "client_id": "${PLAID_CLIENT_ID}",
  "secret": "${PLAID_SECRET}",
  "access_token": "${ACCESS_TOKEN}",
  "account_id": "${ACCOUNT_ID}"
}'

```

```ruby
require 'plaid'

# Change sandbox to production when you're ready to go live!
configuration = Plaid::Configuration.new
configuration.server_index = Plaid::Configuration::Environment[ENV['PLAID_ENV'] || 'sandbox']
configuration.api_key['PLAID-CLIENT-ID'] = ENV['PLAID_CLIENT_ID']
configuration.api_key['PLAID-SECRET'] = ENV['PLAID_SECRET']
configuration.api_key['Plaid-Version'] = '2020-09-14'

api_client = Plaid::ApiClient.new(
  configuration
)

item_public_token_exchange_request = Plaid::ItemPublicTokenExchangeRequest.new(
  {
    public_token: public_token
  }
)
exchange_token_response = client.item_public_token_exchange(item_public_token_exchange_request)
access_token = exchange_token_response.access_token

processor_token_create_request = Plaid::ProcessorStripeBankAccountTokenCreateRequest.new(
  {
    access_token: access_token,
    account_id: account_id
  }
)
stripe_response = client.processor_stripe_bank_account_token_create(processor_token_create_request)
bank_account_token = stripe_response.stripe_bank_account_token

```

```java
import com.plaid.client.model.ItemPublicTokenExchangeRequest;
import com.plaid.client.model.ItemPublicTokenExchangeResponse;
import com.plaid.client.model.ProcessorStripeBankAccountTokenCreateRequest;
import com.plaid.client.model.ProcessorStripeBankAccountTokenCreateResponse;

// Change sandbox to production when you're ready to go live!
HashMap apiKeys = new HashMap();
apiKeys.put("clientId", plaidClientId);
apiKeys.put("secret", plaidSecret);
apiKeys.put("plaidVersion", "2020-09-14");
apiClient = new ApiClient(apiKeys);
apiClient.setPlaidAdapter(ApiClient.Sandbox);

plaidClient = apiClient.createService(PlaidApi.class);

// Exchange the public token from Plaid Link for an access token.
ItemPublicTokenExchangeRequest request = new ItemPublicTokenExchangeRequest()
  .publicToken(publicToken);

Response exchangeResponse = client()
  .itemPublicTokenExchange(request)
  .execute();

if (exchangeResponse.isSuccessful()) {
  String accessToken = exchangeResponse.body().getAccessToken();

  ProcessorStripeBankAccountTokenCreateRequest request = new ProcessorStripeBankAccountTokenCreateRequest()
    .accessToken(accessToken)
    .accountId("FooBarAccountId");

  Response stripeResponse = client()
    .processorStripeBankAccountTokenCreate(request)
    .execute();

  if (stripeResponse.isSuccessful()) {
    String bankAccountToken = stripeResponse.body().getStripeBankAccountToken();
  }
}

```

```python
import plaid
from plaid.api import plaid_api
from plaid.model.item_public_token_exchange_request import ItemPublicTokenExchangeRequest
from plaid.model.processor_stripe_token_create_request import ProcessorStripeBankAccountTokenCreateRequest

# Change sandbox to production when you're ready to go live!
configuration = plaid.Configuration(
    host=plaid.Environment.Sandbox,
    api_key={
        'clientId': PLAID_CLIENT_ID,
        'secret': PLAID_SECRET,
        'plaidVersion': '2020-09-14'
    }
)
api_client = plaid.ApiClient(configuration)
client = plaid_api.PlaidApi(api_client)

exchange_request = ItemPublicTokenExchangeRequest(public_token=public_token)
exchange_token_response = client.item_public_token_exchange(exchange_request)
access_token = exchange_token_response['access_token']

request = ProcessorStripeBankAccountTokenCreateRequest(
    access_token=access_token,
    account_id=account_id,
)
stripe_response = client.processor_stripe_bank_account_token_create(request)
bank_account_token = stripe_response['stripe_bank_account_token']

```

```go
import (
    "context"
    "os"

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

configuration := plaid.NewConfiguration()
configuration.AddDefaultHeader("PLAID-CLIENT-ID", os.Getenv("CLIENT_ID"))
configuration.AddDefaultHeader("PLAID-SECRET", os.Getenv("SECRET"))
configuration.UseEnvironment(plaid.Sandbox)

client := plaid.NewAPIClient(configuration)
ctx := context.Background()

// If not testing in Sandbox, remove these four lines and instead use a publicToken obtained from Link
sandboxInstitution := "ins_109508"
testProducts := []string{"auth"}
sandboxPublicTokenResp, _, err := client.PlaidApi.SandboxPublicTokenCreate(ctx).SandboxPublicTokenCreateRequest(
  *plaid.NewSandboxPublicTokenCreateRequest(
    sandboxInstitution,
    testProducts,
  ),
).Execute()
publicToken := sandboxPublicTokenResp.GetPublicToken()

// Exchange the publicToken for an accessToken
exchangePublicTokenResp, _, err := client.PlaidApi.ItemPublicTokenExchange(ctx).ItemPublicTokenExchangeRequest(
  *plaid.NewItemPublicTokenExchangeRequest(publicToken),
).Execute()
accessToken := exchangePublicTokenResp.GetAccessToken()

// Get Accounts
accountsGetResp, _, err := client.PlaidApi.AccountsGet(ctx).AccountsGetRequest(
  *plaid.NewAccountsGetRequest(accessToken),
).Execute()
accountID := accountsGetResp.GetAccounts()[0].GetAccountId()

// Create Stripe token
stripeTokenCreateResp, _, err := client.PlaidApi.ProcessorStripeBankAccountTokenCreate(ctx).ProcessorStripeBankAccountTokenCreateRequest(
  *plaid.NewProcessorStripeBankAccountTokenCreateRequest(accessToken, accountID),
).Execute()

```

#### Response fields 

string

A token that can be sent to Stripe for use in making API calls to Plaid

string

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Response Object

```json
{
  "stripe_bank_account_token": "btok_5oEetfLzPklE1fwJZ7SG",
  "request_id": "xrQNYZ7Zoh6R7gV"
}
```