Balance funding source sometimes not available

Hi,
When I get the “customer_verified” webhook from Dwolla, I’m saving the verfiied user’s balance funding source by calling /<customer_link>/funding-sources/ endpoint.

In the sandbox environment, I am finding that sometimes the balance funding source is listed under the embedded links returned, and other times not. I am guessing there’s a race issue, because I do see the balance funding source created in the dashboard regardless. Is this a known bug? How do I get around this problem? Is there a webhook that gets fired when the balance funding source is available?

Many thanks,
Will

Hi @dubc, Thanks for posting! The balance funding source is attached when the Customer has a verified status. Perhaps, you’re retrieving the customer’s list of funding sources prior to the account completing the identity verification process? Do you have an example request (timestamp, x-request-id header, etc.) where we could take a look to see if this may be the case?

Thanks for the reply.
I just tried five times in a row and couldn’t repro — but it was happening once every 2-3 times or so for me on Jun 24-25.

The request to retrieve funding sources was happening after the “customer_verified” webhook was receive, and so the customer was definitely verified. My guess is that there’s a race condition where the balance funding source can be created slightly after the user verification.

I’ll update again if we repro.

Sounds good @dubc, please do let us know if you’re able to reproduce!

Hi I just repro’ed this again.
Response from AFTER ‘customer_verified’ webhook:

{
“_links”: {
“self”: {
“href”: “https://api-sandbox.dwolla.com/customers/{id redacted}/funding-sources”,
“type”: “application/vnd.dwolla.v1.hal+json”,
“resource-type”: “funding-source”
},
“customer”: {
“href”: “https://api-sandbox.dwolla.com/customers/{id redacted}”,
“type”: “application/vnd.dwolla.v1.hal+json”,
“resource-type”: “customer”
}
},
“_embedded”: {
“funding-sources”:
}
}

Timestamp is at 2020-07-07T23:35:28.263Z UTC.
I’m using dwolla-v2 nodejs module to make the request. Not sure what other information can be gathered from that.