Query pending Incoming or Outgoing transactions

To better illustrate, here is a sample simplified scenario for a customer.

Pending Incoming ACH transaction:

  • TXN1001: $10 pending ACH from CustomerA
  • TXN1002: $15 pending from CustomerB

Pending Outgoing ACH transaction:

  • TXN1003: $20 to CustomerC
  • TXN1004: $25 to CustomerD

Prior successfully completed transactions:

  • many TXNs… say TXN001 - TXN999

Questions:

  1. What’s the best way to query Pending Only transactions? Referring to sample scenario above, the following is expected query return:
  • pending incoming query will only return TXN 1001/1002
  • pending outgoing query will return TXN 1003/1004

B. Related to question 1, is it possible to query summarized amount? Referring to sample scenario above:

  • pending incoming query: $25.00
  • pending outgoing query: $45.00

Thank you!

Hey @engineeringguildloop

  1. You can use the status query string parameter to filter down your transactions list based on the status of the transfer. Example below:
https://api-sandbox.dwolla.com/customers/{id}/transfers?status=pending
  1. Similar to #1, you can use the startAmount and endAmount. Example below:
https://api-sandbox.dwolla.com/customers/{id}/transfers?startAmount=400.00&endAmount=500.00

You can find more ways to filter the transactions list in our docs here - List and Search Transfers for a Customer | Dwolla API Documentation

Let us know if you have any questions!

Thank you Shreya, this is super helpful. A follow up related question, is there a way differentiate or filter for Incoming and Outgoing pending transaction?
• incoming: pending transfers to the Balance account (VPC)
• outgoing: pending transfers to bank funding source.

Thanks again!

Hi @engineeringguildloop – I’m glad that was helpful! :slight_smile:

To differentiate between incoming and outgoing transactions you can view the resource-type of the source / destination links in the transfer resource.

• incoming: destination link will point to the Customer resource
• outgoing: source link will point to the Customer resource

Excellent, all is clear and implemented as recommended. This topic is concluded.
Thank again @shreya. You are awesome!

1 Like

Thanks @engineeringguildloop! Glad I could be of help! :slight_smile:

Hi @shreya, we noticed something strange after some txn are process.

Our API queries transaction in sandbox for this sample customer:

image

  • sample results ===> status is processed:
    Transfer ID: 04690dbf-d6bb-ed11-814e-e06c8c43255b, status: processed
    Transfer ID: 05690dbf-d6bb-ed11-814e-e06c8c43255b, status: processed
    Transfer ID: 0edea275-d5bb-ed11-814e-e06c8c43255b, status: processed
    Transfer ID: 0fdea275-d5bb-ed11-814e-e06c8c43255b, status: processed

What we noticed:

  • filter status ‘processed’, ‘failed’ or ‘cancelled’ seems to be okay.
  • filter status by ‘pending’ ==> seems like returning ‘processed’ as well.

Is this expected behavior? or there is some adjustments to make or query will only filter pending or unsettled transactions only?

Thank you.

Hi @engineeringguildloop – thanks for sharing the IDs and the code you’re using! Everything looks alright from your end. I checked on our end and discovered an issue that was causing the transfer statuses to not be in sync. The issue should be fixed now. Would you mind giving it another try and see if you see the expected result of only pending transfers?

Hi @shreya - just retried. Query with ?status=pending still returns processed transactions. The console print is as follow. Is there any tweaks needed on our end?

Transfer ID: 04690dbf-d6bb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 05690dbf-d6bb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 0edea275-d5bb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 0fdea275-d5bb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: cf568618-bdbb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 7fd7b811-bdbb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: e0d96f90-b3bb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: e1d96f90-b3bb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: a961bab0-26bb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: aa61bab0-26bb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 85fd5fb7-04bb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 86fd5fb7-04bb-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 3d8e233b-ddba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 3e8e233b-ddba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: d26e57f4-dcba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: d36e57f4-dcba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 98793b6f-dcba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 99793b6f-dcba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 98ec3bcc-dbba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 99ec3bcc-dbba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: cb3cdcaa-d5ba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: baaa5227-d0ba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 85a32818-c9ba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 86a32818-c9ba-ed11-814e-e06c8c43255b, status: processed
Transfer ID: 7ba95968-b9ba-ed11-814e-e06c8c43255b, status: processed

Thank you.

Thanks for the update! I’ve shared the above IDs with our dev team for further investigation. What you have for filtering the transactions list is accurate. I wouldn’t tweak anything.

I will keep you updated on what I hear back from the team!

Thank you @shreya, much appreciated.

Hi @engineeringguildloop – just posting to assure you that we’re still looking into the issue. Would you be able to confirm if newer processed transactions are also ending up in the pending list or are they limited to a certain date range?

Hi @engineeringguildloop – the transfers should now be reinstated and you should see the expected result of only pending transfers when using the filter! Let us know when you get a chance to check!

Hello @shreya and team, just ran a transfer query for a newly created customer, newly created funding source.

API RESPONSE: {
  "_links": {
    "self": {
      "href": "https://api-sandbox.dwolla.com/customers/68e77dff-0f14-464a-b874-6722b6456511/transfers?status=pending",
      "type": "application/vnd.dwolla.v1.hal+json",
      "resource-type": "transfer"
    },
    "first": {
      "href": "https://api-sandbox.dwolla.com/customers/68e77dff-0f14-464a-b874-6722b6456511/transfers?status=pending&limit=25&offset=0",
      "type": "application/vnd.dwolla.v1.hal+json",
      "resource-type": "transfer"
    },
    "last": {
      "href": "https://api-sandbox.dwolla.com/customers/68e77dff-0f14-464a-b874-6722b6456511/transfers?status=pending&limit=25&offset=0",
      "type": "application/vnd.dwolla.v1.hal+json",
      "resource-type": "transfer"
    }
  },
  "_embedded": {
    "transfers": [
      {
        "_links": {
          "self": {
            "href": "https://api-sandbox.dwolla.com/transfers/b94b0ac4-d7be-ed11-814e-e06c8c43255b",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "transfer"
          },
          "source": {
            "href": "https://api-sandbox.dwolla.com/funding-sources/5abec300-c70a-44a1-a8d7-d7aff09a8936",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "funding-source"
          },
          "destination": {
            "href": "https://api-sandbox.dwolla.com/customers/68e77dff-0f14-464a-b874-6722b6456511",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "customer"
          },
          "source-funding-source": {
            "href": "https://api-sandbox.dwolla.com/funding-sources/5abec300-c70a-44a1-a8d7-d7aff09a8936",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "funding-source"
          }
        },
        "id": "b94b0ac4-d7be-ed11-814e-e06c8c43255b",
        "status": "processed",
        "amount": {
          "value": "100.00",
          "currency": "USD"
        },
        "created": "2023-03-10T00:09:09.210Z",
        "clearing": {
          "source": "standard"
        },
        "correlationId": "640a7526204db15239abfa29",
        "individualAchId": "IJJ75KYR",
        "achDetails": {
          "source": {
            "addenda": {
              "values": [
                "Initial add"
              ]
            }
          },
          "destination": {}
        }
      }
    ]
  },
  "total": 1
}

Hello @shreya and team, any update you can provide? Thank you.

Hi @engineeringguildloop, apologies for not replying sooner!

I’m afraid, we are still working on finding a concrete resolution for this issue. We are able to correct the statuses of already created transfers, however we haven’t been able to prevent processed transfers from going out of sync. I did go ahead and update the above transfers so you can see the correct items who up in the pending list.

Thanks for the update @shreya.

Until we have a concrete solution and prevent similar issues, I think what we will do in the interim is to query all /transfers without using query filters, then programmatically remove all records that has been processed. We should be fine with the interim.

Thanks for your understanding, @engineeringguildloop!

That sounds like a good path forward for the interim. You could still use the status=pending filter to exclude the transfers that might have failed or been cancelled, then programmatically remove the processed records that might have erroneously seeped in.

1 Like

Just made the change, initial testing shows the interim works and suffices our use case to accurately inform customers on Pending transfers. Thanks again @shreya and team!

1 Like