Mass Payment Failure Case

If we perform a mass payment which contains an array of items and if one of the item has some wrong data in it for example the bank account number of the user is not correct,the entire api gets failed that means the payment to the rest of the items is also not carried out.How to handle this case as i want to discard the one which has wrong data but i want rest the mass payment to be done to rest of the items?

@Dikshita_Mahajan , It might be helpful to give a quick overview of how mass payments work.

A Mass payment is made up of a list of items that are individual requests to Dwolla to create transactions. That Mass Payment is essentially a job that is queued on Dwolla’s backend and then picked up by a service to process those items. As that service goes through each item it looks at them individually to attempt to create transactions. That Mass Payment job has a status itself which is separate of the statuses of transactions that items may or may not create. Within that Mass Payment each item has a status itself which is also separate of the statuses of transactions those items may created. Here are those statuses:
Mass Payment Statuses - pending, processing, complete
Mass Payment Item Statuses - pending, failed, success
Transfer Statuses - pending, processed, cancelled, and failed

A complete Mass Payment status doesn’t necessarily mean that the items within that job successfully created transactions, or that the transactions that were created from those items were successfully completed either. It simply means that the service that is tasked with iterating through those items to attempt to create transactions has completed. This is mentioned in this post, The typical process is to create the mass payment, listen for the mass_payment_completed event, and then call the API(List Items for a Mass Payment | Dwolla API Documentation) to reconcile those items within the MassPay to determine if transactions were created. From that list of items, if those statuses on those items were success there should be a link on each item which points to the transfer that was created /transfers/{id} . If the status of the item was failed, e.g. bank account removed, account suspended, etc., the item will not create a transfer and the funds would revert back to the balance/wallet of the source Dwolla account.