Create a Custom Batch File Template {#batch-files-managing-template-create}
===========================================================================

Custom batch file templates enable you to send batch files that contain information for transaction services not included with the standard template, such as direct debit and direct debit refunds. IMPORTANT

> You must generate two transaction security keys---one for the ` Cybersource ` production environment and one for the test environment. For information about generating and using security keys, see the [*Creating and Using Security Keys User Guide*](https://developer.cybersource.com/docs/cybs/en-us/security-keys/user/all/ada/security-keys/keys-intro.md "").
> IMPORTANT
> Files that include non-ISO-8859-1 characters are processed, but the characters appear as question marks when you view the transaction details in the ` Business Center ` and in reports.  
> If you normally use the SCMP API to request individual transactions, you need to know which Simple Order API fields correspond to the SCMP API fields with which you are familiar. Mapping information is provided in [Reference: Mapping SCMP API Field Names to Simple Order Names](/docs/cybs/en-us/batch/user/all/rest/batch-upload/batch-ref-scmp-so.md "").

1. To create a custom template using a spreadsheet application or custom script:

2. Enter the file header information.

   #### ADDITIONAL INFORMATION

   These fields are required in the header:

   #### ADDITIONAL INFORMATION

   * merchantID: Your merchant identifier, which consists of up to 30 alphanumeric characters.
   * transactionType: The type of transaction requests contained in the batch file. Possible values:
     * `authorization`
     * `sale`
     * `capture`
     * `credit`
     * `ecDebit`
     * `ecCredit`
   * statusEmail: Email address where *batch status alerts* are sent.
   * recordCount: Change the value from 0 (which is invalid) to the number of transactions (data records) in the file.
   * targetAPIVersion
3. Add this text string at the end of the file header, and make sure to include the leading comma:

   #### ADDITIONAL INFORMATION

   ```
   ,Template=custom
   ```

   #### ADDITIONAL INFORMATION

   This example shows the header portion of a custom batch file template:

   ```
   merchantID=infodev,batchID=12345,creationDate=2007-06-12,
   recordCount=3,purchaseTotals_currency=USD,statusEmail=test@example.com,
   targetAPIVersion=1.90, Template=custom
   ```
4. Following the file header, beginning in row 4, add a data record for each payment transaction request.

   #### ADDITIONAL INFORMATION

   When you create a custom template from a standard template, request fields do not have to be in a specific order. For information about the supported fields in a transaction request, see [Reference: Request Fields for Batch Files](/docs/cybs/en-us/batch/user/all/rest/batch-upload/batch-ref-fields.md "").

5. Save the template.

