plaid/plaid-python

Question: Why is stripe's documentation for processing ACH Direct Debit with plaid python binding different from the docs in this repo.

kaypee90 opened this issue · 7 comments

Question: Why is stripe's documentation for processing ACH Direct Debit with plaid python binding different from the docs in this repo.

stripe's docs are for a different version of the plaid python client library. Let us know if you have any questions about the process! Otherwise we will close this issue.

@phoenixy1 I have no other questions

sounds good. I've reached out to our partnerships team to ask Stripe to update their docs, so closing this ticket

it has never been updated properly and wait.. oh my God! Look.. please include imports on every snippet particularly on plaid docs about this process. E.g see below.. where are LinkTokenCreateRequest, Products, LinkTokenAccountFilters, LinkTokenCreateRequestUser, client imported from? .. this is key

request = LinkTokenCreateRequest(
    products=[Products('auth'), Products('transactions')],
    client_name="Plaid Test App",
    country_codes=[CountryCode('US')],
    redirect_uri='https://domainname.com/oauth-page.html',
    language='en',
    webhook='https://sample-webhook-uri.com',
    link_customization_name='default',
    account_filters=LinkTokenAccountFilters(
        depository=DepositoryFilter(
            account_subtypes=AccountSubtypes(
                [AccountSubtype('checking'), AccountSubtype('savings')]
            )
        )
    )
    user=LinkTokenCreateRequestUser(
        client_user_id='123-test-user-id'
    )
)
# create link token
response = client.link_token_create(request)
link_token = response['link_token']

@theambidextrous thank you for the note -- I've sent a followup to our Stripe partnerships account manager and also filed a ticket on our end to add imports to our code snippets.

@theambidextrous btw can you let me know where that code sample is from? I checked our stripe docs https://plaid.com/docs/auth/partnerships/stripe/ and they do have the import statements

Thanks. So look https://plaid.com/docs/api/tokens/#linktokencreate . you notice most plaid related libs are not imported and even on what you shared here https://plaid.com/docs/auth/partnerships/stripe/ , it still doesnt show where plaid elements are being imported from. You notice below that, we cant tell where LinkTokenCreateRequest, Products etc are being imported from

from plaid.api import plaid_api
from flask import Flask
from flask import render_template
from flask import request
from flask import jsonify
app = Flask(name)
configuration = plaid.Configuration(
  host=plaid.Environment.Sandbox,
  api_key={
    'clientId': PLAID_CLIENT_ID,
    'secret': PLAID_SECRET,
  }
)
api_client = plaid.ApiClient(configuration)
client = plaid_api.PlaidApi(api_client)
@app.route("/create_link_token", methods=['POST'])
def create_link_token():
    # Get the client_user_id by searching for the current user
    user = User.find(...)
    client_user_id = user.id
    # Create a link_token for the given user
    request = LinkTokenCreateRequest(
            products=[Products("auth")],
            client_name="Plaid Test App",
            country_codes=[CountryCode('US')],
            redirect_uri='https://domainname.com/oauth-page.html',
            language='en',
            webhook='https://webhook.example.com',
            user=LinkTokenCreateRequestUser(
                client_user_id=client_user_id
            )
        )
    response = client.link_token_create(request)
    # Send the data to the client
    return jsonify(response.to_dict())
if __name__ == "__main__":
    app.run(port=8000)