How to get funding source balance and list of transactions of verified customer

@shreya @spencer
I need to get funding source balance and i am using below code in php

$fundingSourceUrl = 'https://api-sandbox.dwolla.com/funding-sources/c2eb3f03-1b0e-4d18-a4a2-e552cc111418';
$fsApi = new DwollaSwagger\FundingsourcesApi($apiClient);
$fundingSource = $fsApi->getBalance($fundingSourceUrl);

and I am getting {"code":"Forbidden","message":"The supplied credentials are not authorized for this resource."}

Please note that I am requesting this for verified customer. Please suggest. Also, I did not find any api link to get list of transactions for verified customers. 

Thanks,
Vikas

Hi @vikas – Are you retrieving the balance of a Dwolla Balance of a Customer in your account? The above ID (c2eb3f03-1b0e-4d18-a4a2-e552cc111418) belongs to one of our Accounts, which is likely why the error is being thrown.

Here’s the API reference for retrieving all transfers for a Customer - List and Search Transfers for a Customer | Dwolla API Documentation

Hope that helps!

the code I have shared is the exact copy from the API doc. I was using the funding source URL from my sand box verified customer whose actual funding source URL is:
https://api-sandbox.dwolla.com/funding-sources/3ff5b592-dbad-4235-b8ae-16633695b396

Hi @vikas , The funding source ID you shared represents the type bank, which we do not support checking the balance amount within our API. The balance endpoint in our API /funding-sources/{id}/balance is only used for retrieving the Dwolla balance which exists for Verified Customer Records. If you need to check the bank balance amount of a user’s connected checking or savings account, I’d recommend taking a look at a third party bank aggregation provider such as Plaid, MXData, Finicity, etc.

I am trying to get the dwolla balance of verified customer. You can check the below customer URL for which I am trying:
https://api-sandbox.dwolla.com/customers/e099bdec-96a6-4c18-81f4-bb016968a3d4

Kindly let me know how I can get this.

Hi @vikas – you can find the Dwolla Balance of a Customer by using the List funding-sources for a Customer endpoint. When you parse through the list, the item with "type": "balance" is the Balance funding-source.

You can find more information about Dwolla Balance in the resource that Spencer linked above! (Dwolla Balance)

Thank you so much @shreya for sharing this. I followed your instruction and got the desired result.

@shreya
Regarding the list of transaction, api returns amount, currency and link of source customer. Please let me know if I will have to get name of the customer through their source customer URL or Dwolla API has another option so that we can get the list of transaction along with customer name?

Hi @vikas – you can get the name of the Customer by following the Customer URL via the API! Retrieve Customer | Dwolla API Documentation