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 