> For the complete documentation index, see [llms.txt](https://docs.solapayments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.solapayments.com/products/batch-processing.md).

# Batch Processing

## Overview

Sola's batch processing tool allows you to process a large volume of transactions in a single batch, all at once. Batches can be processed for a single account or multiple accounts.

{% hint style="warning" %}
The batch processing tool requires SFTP. Please reach out to <support@solapayments.com> for access.
{% endhint %}

### Conventions <a href="#batchprocessing-conventions" id="batchprocessing-conventions"></a>

**x** = Incrementing Sequence Number

* Numbers can be skipped but they must always be greater than the previous file.
* Files with older or invalid sequence numbers are ignored.
* Sequence Number Max Value = 999999999 (9 digits).

**KVP** = URL Encoded Key-Value-Pair

* Sample: `xName=John%20Smith&xAmount=1`
* **Note**: Ensure that all values are URL encoded.

## Batch Upload Lifecycle <a href="#batchprocessing-batchuploadlifecycle" id="batchprocessing-batchuploadlifecycle"></a>

### Request <a href="#batchprocessing-request" id="batchprocessing-request"></a>

1. Client uploads Request/REQUEST\_X.KVP
2. Client uploads Request/PROCESS\_X.KVP
3. Batch process is triggered when Request/PROCESS\_X.KVP is received

### Response <a href="#batchprocessing-response" id="batchprocessing-response"></a>

1. Gateway saves Response/RESPONSE\_X.KVP
2. Gateway saves Response/COMPLETE\_X.KVP
3. Client polls and parses Response/COMPLETE\_X.KVP
4. If `xStatus`=Success, then client downloads and parses Response/RESPONSE\_X.KVP
5. Client deletes all files from Response folder

## File Formats <a href="#batchprocessing-fileformats" id="batchprocessing-fileformats"></a>

### Request Data File <a href="#batchprocessing-requestdatafile" id="batchprocessing-requestdatafile"></a>

**Filename Format:** REQUEST\_X.KVP

* Each line contains an individual transaction in KVP format. Any transaction that can be executed via the standard API can be submitted in the Request Data File.

**Required Variables:**

| **Value**                      | **Description**                                               | **Sample Data**                                                                                                               |
| ------------------------------ | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `xIndex`                       | The zero-based index number of each row.                      | `xIndex=0&xSequenceNumber=99999&xKey=&xVersion=&xSoftwareNa me=&xSoftwareVersion=&xCommand=&xCardNum=&xExp=&xName=& xAmount=` |
| `xSequenceNumber`              | Must match the Incrementing Sequence Number in the file name. | `xIndex=0&xSequenceNumber=99999&xKey=&xVersion=&xSoftwareNa me=&xSoftwareVersion=&xCommand=&xCardNum=&xExp=&xName=& xAmount=` |
| Standard API request variables | See [iFields](/products/ifields.md).                          | `xIndex=0&xSequenceNumber=99999&xKey=&xVersion=&xSoftwareNa me=&xSoftwareVersion=&xCommand=&xCardNum=&xExp=&xName=& xAmount=` |

### Request Metadata File <a href="#batchprocessing-requestmetadatafile" id="batchprocessing-requestmetadatafile"></a>

**Filename Format:** PROCESS\_X.KVP\
**Required Variables:**

| **Value**         | **Description**                                              | **Sample Data**                                               |
| ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------- |
| `xKey`            | Batch upload credential (not the merchant credential).       | `xKey=&xSubmittedCount=500&xFormat=KVP&xSequenceNumber=99999` |
| `xSubmittedCount` | Count of transactions in the Request File.                   | `xKey=&xSubmittedCount=500&xFormat=KVP&xSequenceNumber=99999` |
| `xFormat`         | KVP.                                                         | `xKey=&xSubmittedCount=500&xFormat=KVP&xSequenceNumber=99999` |
| `xSequenceNumber` | Must match the incrementing sequence number in the file name | `xKey=&xSubmittedCount=500&xFormat=KVP&xSequenceNumber=99999` |

### Response Data File <a href="#batchprocessing-responsedatafile" id="batchprocessing-responsedatafile"></a>

**Filename Format:** RESPONSE\_X.KVP

* Each line contains an individual response in KVP format.

**Required Variables:**

| **Value**                       | **Description**                                      | **Sample Data**                                                                                                                    |
| ------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `xIndex`                        | Corresponds to the xIndex in the request.            | `xIndex=0&xSequenceNumber=99999&xResult=&xStatus=&xError=&xRe fNum=&xAuthCode=&xAuthAmount=&xToken=&xMaskedCardNumber= &xInvoice=` |
| `xSequenceNumber`               | Corresponds to the `xSequenceNumber` in the request. | `xIndex=0&xSequenceNumber=99999&xResult=&xStatus=&xError=&xRe fNum=&xAuthCode=&xAuthAmount=&xToken=&xMaskedCardNumber= &xInvoice=` |
| Standard API response variables | See [API Docs](/api/transaction/credit-card.md).     | `xIndex=0&xSequenceNumber=99999&xResult=&xStatus=&xError=&xRe fNum=&xAuthCode=&xAuthAmount=&xToken=&xMaskedCardNumber= &xInvoice=` |

### Response Metadata File <a href="#batchprocessing-responsemetadatafile" id="batchprocessing-responsemetadatafile"></a>

**Filename Format:** COMPLETE\_X.KVP

**Required Variables:**

| **Value**         | **Description**                                                       | **Sample Data**                                                                                           |
| ----------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `xResult`         | <p>Status of the batch upload process.</p><p>Success/Error value.</p> | `xKey=&xSubmittedCount=500&xFormat=KVP&xSequenceNumber=9999 9&xResult=&xStatus=&xError=&xProcessedCount=` |
| `xStatus`         | <p>Status of the batch upload process.</p><p>Success/Error value.</p> | `xKey=&xSubmittedCount=500&xFormat=KVP&xSequenceNumber=9999 9&xResult=&xStatus=&xError=&xProcessedCount=` |
| `xError`          | If `xStatus` = Error, this variable contains the error message.       | `xKey=&xSubmittedCount=500&xFormat=KVP&xSequenceNumber=9999 9&xResult=&xStatus=&xError=&xProcessedCount=` |
| `xProcessedCount` | Count of the processed transactions.                                  | `xKey=&xSubmittedCount=500&xFormat=KVP&xSequenceNumber=9999 9&xResult=&xStatus=&xError=&xProcessedCount=` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.solapayments.com/products/batch-processing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
