• SDK Support
    Authorization
    Root
    Accounts
    Customers
    Knowledge-based Authentication (KBA)
    Beneficial Owners
    Documents
    Funding Sources
    Transfers
    Mass payments
    Labels
    Events
    Webhook subscriptions
    Webhooks

Create a client token #

The client token API request requires an action as well as a link which points to the Customer that identifies the end user performing the action within the drop-in component. The action is a string that contains a granular permission for the Customer performing the action within a drop-in component. Note: This endpoint requires application authorization.

Client token actions #

ComponentComponent NamePossible ActionsCreate a Receive-only Userdwolla-customer-createcustomer.createCreate an Unverified Customerdwolla-customer-createcustomer.createUpgrade an Unverified Customerdwolla-customer-updatecustomer.read
customer.updateCreate a personal Verified Customerdwolla-personal-vcrcustomer.create
customer.read
customer.update
customer.documents.createCreate a business Verified Customerdwolla-business-vcrcustomer.create
customer.read
customer.update
customer.documents.create
businessclassifications.readCreate Beneficial Ownersdwolla-beneficial-ownersbeneficialowners.create
beneficialowners.read
beneficialowners.update
beneficialowners.delete
beneficialownership.read
beneficialownership.certify
beneficialowner.documents.create
customer.read
customer.updateDocument upload for a Customer or Beneficial Ownerdwolla-document-uploadcustomer.read
customer.documents.create
customer.documents.read
beneficialowners.read
beneficialowner.documents.createDisplay a Verified Customer’s Balancedwolla-balance-displaycustomer.fundingsources.readPay-indwolla-payincustomer.fundingsources.read
customer.transfers.send

HTTP request #

POST https://api.dwolla.com/client-tokens

Request parameters #

ParameterRequiredTypeDescriptionactionyesobjectA granular permission for the Customer performing an action within a drop-in component. Reference the client token actions to learn more._linksyesobjectA _links JSON object that contains a link to the desired customer performing the action within the drop-in component.

Request and response

JavaScript
// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
var requestBody = {
  _links: {
    customer: {
      href: "https://api-sandbox.dwolla.com/customers/707177c3-bf15-4e7e-b37c-55c3898d9bf4",
    },
  },
  action: "customer.update",
};

dwolla.post("/client-tokens", requestBody).then((res) => res.body.token); // => '4adF858jPeQ9RnojMHdqSD2KwsvmhO7Ti7cI5woOiBGCpH5krY'

Client token usage #

Client tokens are required during the configuration of drop-in components. There may be multiple isolated functions within a single drop-in flow that each require granularly scoped client-tokens for that specific action. For this reason, it is recommended that you set up a server-side endpoint for fetching client-tokens which the dwolla-web library can make HTTP calls to as needed throughout the lifecycle of a drop-in component. Check out Step 2 of our guide for more details on setting up a server-side endpoint for generating client tokens.

Check out the table below for the paramaters required during configuration.

Configure options object

ParameterTypeDescriptionenvironmentstringAcceptable values of: sandbox or productionstylesstringOptional. A relative or absolute URL linking to a hosted stylesheet containing component styles.tokenfunctionA function that gets called by the component for fetching client-tokens as needed throughout the flow.
Example usage: token: (req) => Promise.resolve(dwollaAPIToken(req, {blah: "abcd"}))tokenUrlfunctionA URL pointing to a server-side endpoint that can be used to generate client-token.
Example usage: tokenUrl: "tokenUrl"successfunctionA function that gets called upon a successful request from the Component.errorfunctionA function that gets called when an error occurs in the Component.
Example configuration (using tokenUrl)
javascript
<script>
  dwolla.configure({
    environment: "sandbox",
    styles: "/styles/update-custom.css",
    tokenUrl: "/tokenUrl",
    // token: (req) => Promise.resolve(dwollaAPIToken(req, {blah: "abcd"})),
    success: (res) => Promise.resolve(res),
    error: (err) => Promise.resolve(err),
  });
</script>
Check out this guide for an end-to-end implementation of a Business Verified Customer drop-in component.

Test in the Sandbox for free today.

Use sandbox environment to test API requests.

Get API Keys
2022 All Rights Reserved
Financial institutions play an important role in our network.

All funds transfers made using the Dwolla Platform are performed by a financial institution partner, and any funds held in a Dwolla Balance are held by a financial institution partner. Learn more about our financial institution partners.