Duplicate transfers for a single transfer

I created a transfer

        url = "https://api-sandbox.dwolla.com/transfers"
        payload = json.dumps({
            '_links': {
                'source': {
                    'href': 'https://api-sandbox.dwolla.com/funding-sources/c70e362a-0961-4cf2-a736-67ce5fdda207'
                },
                'destination': {
                    'href': 'https://api-sandbox.dwolla.com/funding-sources/9adc5756-e06c-45b7-9714-9be690483a57'
                }
            },
            'amount': {
                'currency': 'USD',
                'value': '2.00'
            }
        })

and list all the transfers using “https://api-sandbox.dwolla.com/accounts/9adc5756-e06c-45b7-9714-9be690483a57/transfers” API I am getting a response as follows

"_embedded": {
            "transfers": [
                {
                    "_links": {
                        "cancel": {
                            "href": "https://api-sandbox.dwolla.com/transfers/d6f4fbff-6b26-ec11-8138-fd945f81a1fa",
                            "resource-type": "transfer",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "destination": {
                            "href": "https://api-sandbox.dwolla.com/accounts/46e2a656-a778-4cc2-9a9b-ccd6c089a5c0",
                            "resource-type": "account",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "funded-transfer": {
                            "href": "https://api-sandbox.dwolla.com/transfers/d7f4fbff-6b26-ec11-8138-fd945f81a1fa",
                            "resource-type": "transfer",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "self": {
                            "href": "https://api-sandbox.dwolla.com/transfers/d6f4fbff-6b26-ec11-8138-fd945f81a1fa",
                            "resource-type": "transfer",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "source": {
                            "href": "https://api-sandbox.dwolla.com/funding-sources/c70e362a-0961-4cf2-a736-67ce5fdda207",
                            "resource-type": "funding-source",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "source-funding-source": {
                            "href": "https://api-sandbox.dwolla.com/funding-sources/c70e362a-0961-4cf2-a736-67ce5fdda207",
                            "resource-type": "funding-source",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        }
                    },
                    "amount": {
                        "currency": "USD",
                        "value": "2.00"
                    },
                    "clearing": {
                        "source": "standard"
                    },
                    "created": "2021-10-06T06:09:51.683Z",
                    "id": "d6f4fbff-6b26-ec11-8138-fd945f81a1fa",
                    "individualAchId": "I8WRELN5",
                    "status": "pending"
                },
                {
                    "_links": {
                        "cancel": {
                            "href": "https://api-sandbox.dwolla.com/transfers/d7f4fbff-6b26-ec11-8138-fd945f81a1fa",
                            "resource-type": "transfer",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "destination": {
                            "href": "https://api-sandbox.dwolla.com/customers/f2f68cac-aeb3-4585-badb-a3fc99f62e4c",
                            "resource-type": "customer",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "destination-funding-source": {
                            "href": "https://api-sandbox.dwolla.com/funding-sources/9adc5756-e06c-45b7-9714-9be690483a57",
                            "resource-type": "funding-source",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "funding-transfer": {
                            "href": "https://api-sandbox.dwolla.com/transfers/d6f4fbff-6b26-ec11-8138-fd945f81a1fa",
                            "resource-type": "transfer",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "self": {
                            "href": "https://api-sandbox.dwolla.com/transfers/d7f4fbff-6b26-ec11-8138-fd945f81a1fa",
                            "resource-type": "transfer",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "source": {
                            "href": "https://api-sandbox.dwolla.com/accounts/46e2a656-a778-4cc2-9a9b-ccd6c089a5c0",
                            "resource-type": "account",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "source-funding-source": {
                            "href": "https://api-sandbox.dwolla.com/funding-sources/c70e362a-0961-4cf2-a736-67ce5fdda207",
                            "resource-type": "funding-source",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        }
                    },
                    "amount": {
                        "currency": "USD",
                        "value": "2.00"
                    },
                    "clearing": {
                        "source": "standard"
                    },
                    "created": "2021-10-06T06:09:51.650Z",
                    "id": "d7f4fbff-6b26-ec11-8138-fd945f81a1fa",
                    "status": "pending"
                }
            ]
        },
        "_links": {
            "first": {
                "href": "https://api-sandbox.dwolla.com/accounts/46e2a656-a778-4cc2-9a9b-ccd6c089a5c0/transfers?&limit=25&offset=0",
                "resource-type": "transfer",
                "type": "application/vnd.dwolla.v1.hal+json"
            },
            "last": {
                "href": "https://api-sandbox.dwolla.com/accounts/46e2a656-a778-4cc2-9a9b-ccd6c089a5c0/transfers?&limit=25&offset=0",
                "resource-type": "transfer",
                "type": "application/vnd.dwolla.v1.hal+json"
            },
            "self": {
                "href": "https://api-sandbox.dwolla.com/accounts/46e2a656-a778-4cc2-9a9b-ccd6c089a5c0/transfers",
                "resource-type": "transfer",
                "type": "application/vnd.dwolla.v1.hal+json"
            }
        },
        "total": 2
    }
}

What I am not able to understand is, why there is

  • /accounts link in the destination and no destination_funding_source link in the first transfer
  • /customer in the destination for the second transfer

I am not able to fully grasp the flow for a transaction
and I also need to know how can I identify whether the transfer is a credit or debit
So can you please help me with that!

Thanks :grin:

Hi @Ankit

There are multiple legs to a single transfer. I commented your response code for https://api-sandbox.dwolla.com/accounts/9adc5756-e06c-45b7-9714-9be690483a57/transfers for some clarity, although 9adc5756-e06c-45b7-9714-9be690483a57 is a customer’s funding source, not an accountid.

The response lists all transaction associated with the funding source 9adc5756-e06c-45b7-9714-9be690483a5

Below I commented the first transaction

"_embedded": {
            "transfers": [
                {
                    "_links": {
                        "cancel": {
                            "href": "https://api-sandbox.dwolla.com/transfers/d6f4fbff-6b26-ec11-8138-fd945f81a1fa", // First leg of transfer from superhero savings to..
                            "resource-type": "transfer",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "destination": {
                            "href": "https://api-sandbox.dwolla.com/accounts/46e2a656-a778-4cc2-9a9b-ccd6c089a5c0", // to dwolla balance
                            "resource-type": "account",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "funded-transfer": {
                            "href": "https://api-sandbox.dwolla.com/transfers/d7f4fbff-6b26-ec11-8138-fd945f81a1fa", // Second leg of transfer. Notice the id changed slightly, from d6 to d7. This leg is from the dwolla balance to the balance of "The Business"
                            "resource-type": "transfer",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "self": {
                            "href": "https://api-sandbox.dwolla.com/transfers/d6f4fbff-6b26-ec11-8138-fd945f81a1fa",
                            "resource-type": "transfer",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "source": {
                            "href": "https://api-sandbox.dwolla.com/funding-sources/c70e362a-0961-4cf2-a736-67ce5fdda207", //Original transfer id
                            "resource-type": "funding-source",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        },
                        "source-funding-source": {
                            "href": "https://api-sandbox.dwolla.com/funding-sources/c70e362a-0961-4cf2-a736-67ce5fdda207", //illustrating the superhero savings (source)
                            "resource-type": "funding-source",
                            "type": "application/vnd.dwolla.v1.hal+json"
                        }
                    },
                    "amount": {
                        "currency": "USD",
                        "value": "2.00"
                    },
                    "clearing": {
                        "source": "standard"
                    },
                    "created": "2021-10-06T06:09:51.683Z",
                    "id": "d6f4fbff-6b26-ec11-8138-fd945f81a1fa",
                    "individualAchId": "I8WRELN5",
                    "status": "pending"
                }
                    

There are no more legs to this transfer because its status is still pending. Once you click on the process bank transfer button in the sandbox, you should see all the legs of this transfer.