Bank to Bank transfer workflow (webhook)

Hello guys,

Following your documentation on transfer webhook events.
To be sure that a transfer has been received successfully on a destination bank account, we would have to listen for the webhook customer_bank_transfer_completed but, I don’t understand what the resourceId refers to, example received :

{“id”: “4a4275a3-c1ba-4561-9d04-6e6550ec2741”, “topic”: “customer_bank_transfer_completed”, “created”: “2021-02-02T12:28:58.323Z”, “resourceId”: “04462866-4461-eb11-8144-e6f30857b337”}

How can I link the customer_bank_transfer_completed to the destination customer id or destination funding source id please ?

Hi @Karl_spendesk , Thanks for posting! For the bank-to-bank scenario you are working through, what are the source and destination Customer types in this transaction flow?

Hi Spencer,

The source is a Business verified customer and the destination is an unverified customer.

I’ve dug into every endpoints query with this resource id and I found out that it was related to another transfer entity created by Dwolla system.

Do you have a documentation explaining these inbound/outbound transfers relationship with the customers source/destination please ?

Hi @Karl_spendesk , you should be able to use the Transfer Scenario 2 example in the link you shared above as a reference to the sequence of events you’ll see.

When the transfer is created, you’ll get back an identifier (URL) in the response to reference that transfer in the API. This ID is shared by both the source and destination user in the transaction. Since the source account is able to hold a balance in Dwolla, funds pass through that balance before being credited to the destination user’s bank account. You should see another unique ID to represent the bank to balance transfer for the source user which gets created behind the scenes by Dwolla to fund the payment to the destination user. So in this transfer flow, there are two “legs” of the overall transfer workflow:

  1. Customer A bank → Customer A balance
  2. Customer A balance → Customer B bank

For #1 above, you’ll see the customer_bank_transfer_created & customer_bank_transfer_completed events when the transfer is created and completed to the balance respectively. To determine if funds completed successfully to the destination user’s bank account, you’d want to listen for the customer_transfer_completed event.

What I would likely recommend for this scenario is storing the transfer URL that gets returned in the API on creation. This is the URL that will show up in the payload of the customer_transfer_* events. What you could then do, is use the _links that are returned on that specific transfer to reference the ACH debit transfer that gets created behind the scenes from Dwolla (#1 above). This transfer can be referenced using the funding-transfer link rel which is contained within the _links object. Here’s an example:

GET https://api-sandbox.dwolla.com/transfers/165dca7c-396d-eb11-812c-fa7f62b274da

{
        "_links": {
            "cancel": {
                "href": "https://api-sandbox.dwolla.com/transfers/165dca7c-396d-eb11-812c-fa7f62b274da",
                "type": "application/vnd.dwolla.v1.hal+json",
                "resource-type": "transfer"
            },
            "source": {
                "href": "https://api-sandbox.dwolla.com/customers/5ed7b47b-cc22-4782-95b4-777e09516005",
                "type": "application/vnd.dwolla.v1.hal+json",
                "resource-type": "customer"
            },
            "funding-transfer": {
                "href": "https://api-sandbox.dwolla.com/transfers/155dca7c-396d-eb11-812c-fa7f62b274da",
                "type": "application/vnd.dwolla.v1.hal+json",
                "resource-type": "transfer"
            },
            "destination-funding-source": {
                "href": "https://api-sandbox.dwolla.com/funding-sources/4aba95f2-ac5f-4651-83ef-791ff64a4f98",
                "type": "application/vnd.dwolla.v1.hal+json",
                "resource-type": "funding-source"
            },
            "self": {
                "href": "https://api-sandbox.dwolla.com/transfers/165dca7c-396d-eb11-812c-fa7f62b274da",
                "type": "application/vnd.dwolla.v1.hal+json",
                "resource-type": "transfer"
            },
            "source-funding-source": {
                "href": "https://api-sandbox.dwolla.com/funding-sources/198dad00-df79-4119-b870-3d6dda3199cd",
                "type": "application/vnd.dwolla.v1.hal+json",
                "resource-type": "funding-source"
            },
            "destination": {
                "href": "https://api-sandbox.dwolla.com/customers/4594a375-ca4c-4220-a36a-fa7ce556449d",
                "type": "application/vnd.dwolla.v1.hal+json",
                "resource-type": "customer"
            }
        },
        "id": "165dca7c-396d-eb11-812c-fa7f62b274da",
        "status": "pending",
        "amount": {
            "value": "10.00",
            "currency": "USD"
        },
        "created": "2021-02-12T13:52:13.340Z",
        "clearing": {
            "source": "next-day"
        }
    }

Another option you could use to track the transaction end-to-end would be to pass in your own unique ID to the correlationId field on transfer creation. This field would show up on both the inbound and be passed through to the outbound transfer.

1 Like

A post was split to a new topic: Dwolla API Integration Assistance