get https://securepayments.loanpro.io/api/nacha/report/
This request downloads a NACHA file.
Click here to learn more about this request
Before sending this request, ensure the following steps within the NACHA process have been completed:
- Create a customer ↗
- Create a bank account ↗ and Add a bank account to customer profile ↗
- Create a NACHA processor ↗
- Create a NACHA transaction ↗
- Generate a NACHA batch file ↗
NACHA files are downloaded as blobs. To download a blob, it must be converted into a file.
Need some help converting a blob into a file?
If you're testing this request within Postman, you can download the file by selecting 'Save response to file' in the response drop-down menu:
Additionally, here's a sample code snippet that sends the download request and converts the blob into a file:
const uuid = 'ad94fdb1-76a6-4939-9ddb-0ae99138b113'; var request = new XMLHttpRequest(); request.open('GET', 'https://securepayments.loanpro.io/api/nacha/report/' + uuid); request.setRequestHeader('Authorization', '<YOUR TOKEN>'); request.setRequestHeader('Secret', '<YOUR SECRET>') request.responseType = 'arraybuffer'; request.send(); request.onreadystatechange = function() { if(request.readyState == 4) { var blob = new Blob([request.response], {type: "octet/stream"}); var fileName = "file.zip"; saveAs(blob, fileName); } }