Ask AI or search...
Get API Keys
  • API Fundamentals
    SDK Support
    Authorization
    Root
    Accounts
    Customers
    Knowledge-based Authentication (KBA)
    Beneficial Owners
    Documents
    Exchanges
    Open Banking
    Funding Sources
    Transfers
    Labels
    Mass payments
    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 Actions
Create a Receive-only Userdwolla-customer-createcustomer.create
Create an Unverified Customerdwolla-customer-createcustomer.create
Upgrade an Unverified Customerdwolla-customer-updatecustomer.read
customer.update
Create a personal Verified Customerdwolla-personal-vcrcustomer.create
customer.read
customer.update
customer.documents.create
Create a business Verified Customerdwolla-business-vcrcustomer.create
customer.read
customer.update
customer.documents.create
businessclassifications.read
Create Beneficial Ownersdwolla-beneficial-ownersbeneficialowners.create
beneficialowners.read
beneficialowners.update
beneficialowners.delete
beneficialownership.read
beneficialownership.certify
beneficialowner.documents.create
customer.read
customer.update
Document upload for a Customer or Beneficial Ownerdwolla-document-uploadcustomer.read
customer.documents.create
customer.documents.read
beneficialowners.read
beneficialowner.documents.create
Create a Funding Sourcedwolla-funding-source-createcustomer.fundingsources.create
customer.microdeposits.create
Verify Micro Depositsdwolla-micro-deposits-verifycustomer.fundingsources.read, customer.microdeposits.verify
Display a Verified Customer’s Balancedwolla-balance-displaycustomer.fundingsources.read
Pay-indwolla-payincustomer.fundingsources.read
customer.transfers.send

HTTP request #

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

Request parameters #

ParameterRequiredTypeDescription
actionyesobjectA 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

Raw
POST https://api-sandbox.dwolla.com/client-tokens
Accept: application/vnd.dwolla.v1.hal+json
Content-Type: application/json
Authorization: Bearer {{token}}
{
"action": "customer.update”,
  "_links": {
    “customer”: {
        “href”: “https://api-sandbox.dwolla.com/customers/{{customerId}}”
    }
  }
}

...

{
 "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

ParameterTypeDescription
environmentstringAcceptable values of: sandbox or production
stylesstringOptional. 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
2024 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.