Ok got ya. It sounds like each API call is initiated by your actual involvement. When you say software, this is a custom built proprietary software that you use for your business only, and not a piece of software that you market commercially to others for their use? And I’m not missing something in regards to your API calls having to be made over web servers, correct?
The reason I ask is that you can automate this whole thing if the answer to question one is it’s yours only and question two is yes you use a web server.
What you do want to do is set up a local environment (web server) on your computer. You could also use on a remote server if more than one person needs access to this function. Then you set up a database to store the data. Once you have that set up you want to set your servers timeout to some very large value, the default is 30 seconds and you want a lot more.
Next you would have to program a server side script that makes each api call in succession. So rather than making one, relaying info from that to the next one, and so on, you would want to have the first API call made, then an intermediate section of the script extracts the data from that API result needed to make the next API call. You can string as many API calls as you want together that way.
Then what you want to do is have a final section that organizes and compiles the data into what you need to issue the chargebacks. The transactions with the chargebacks will be inserted in your database. You can pull them up for view before making a decision, or if you want you could have the charge backs happen on an automated basis as well.
Once you have this set up, you will just run your individual API call and let your computer spin. That is why you set your timeout to an extreme value. The repeated API calls and data compiling will take at least a couple of minutes if you have a very large list of transactions.
And in regards to tying the orders together, it can be done. Everything I have described to you I have implemented or implemented in some roughly similar way, just not for the purpose of chargebacks. I couldnt explain it from memory as it took quite a bit of programming to get it right.
The end result I made for my clients is a table that shows their internal records side by side with what authorize has on file, with internal order and transaction numbers. The purpose is to see if their database is missing information (it never is).
To give a brief background, on our integrations on the web, the order is place BEFORE the customer pays, and then the customer is transferred to authorize to complete payment. This creates an obvious issue of having orders in our admin area that we don’t want to ship cause people did not pay.
the way to work this out is to have authorize send a webhook to our server with the results of successful transactions. Our webhooks endpoint does automated database updates to mark orders as paid each time a webhook is delivered. In the live environment we have never had one fail, ever. However out of the close to 1,000 tests I have ran in the testing environment, I have had about 10 where my scripts did not execute properly. This creates a tiny but annoying chance that there are orders in our database not marked as paid but that actually needs to be shipped because the customer is waiting on it and has been charged.
My clients are on top of their orders, but I wanted them to have a last resort if they are in doubt or want to double check. The 31 day data pull took quite a bit of time, so I have their button pull one weeks worth of data. It takes about 4 seconds to complete. I eventually want to automate this so that missing orders will automatically be detected and update as part of the script triggered by the button. They have a small business and you sound to have much more volume, which is why I recommend you set your server with the longest timeout setting allowed.