Introduction

Batches allow a merchant to submit many transactions for processing at the same time, which may be more advantageous than submitting many individual transactions to our API. They are defined in CSV files, which are then zipped and sent to Merchant Warrior for processing.

To submit a batch via our API, please see processBatch.

To submit a batch via Barracks, please use the Batch menu and follow the prompts.

Batches can exist as three different types; card, token and direct debit.

  • Card batches have raw card data in the batch file for processing
  • Token batches have tokens in the batch file for processing
  • Direct debit batches have direct debits in the batch file for processing

Batch files cannot mix the above three types together (ie. a file must be all card, all token, or all direct debit). If you need to process multiple types, then multiple files should be submitted.

The structure of the CSV files is shown below, for each type of batch.

Card Batches

Sample batch files for cards can be found here.

Request CSV Parameters

Parameter Description
transactionProduct

A product (or sale) id or description. We recommend using an order/product id. This field’s primary purpose is to help the transaction be identifiable for reporting and accounting purposes.
Example: ABC4321
Valid length: Up to 255 characters. Some Acquirers limit this field to 40 characters.

customerName

This field can only contain alphanumeric characters, as well as the full stop, comma, apostrophe, ampersand, space and hyphen characters.
Example: Mr. Example Person
Valid length: Between 2 and 255 characters

customerPhone

The customer's phone number. Anything other than +,-, space and 0-9 will be stripped.
Example: 0401234567 or 61731234567
Valid length: Up to 25 characters

customerEmail

The customer's email.
Example: [email protected]
Valid length: Up to 255 characters

customerCountry

Two letter ISO 3166-1 alpha-2 country code.
Example: AU
Valid length: 2 characters

customerState

Freeform field, keep consistent for your records and reporting.
Example: Queensland
Valid length: Up to 75 characters

customerCity

Freeform field, keep consistent for your records and reporting.
Example: Brisbane
Valid length: Up to 75 characters

customerAddress

Freeform field.
Example: 123 Test Street
Valid length: Up to 255 characters

customerPostCode

This can also accomodate ZIP/Post codes for international transactions.
Example: 4000
Valid length: Between 4 and 10 characters

paymentCardNumber

Only certain card numbers are deemed valid in the test environment. See Test Data for more information. Do not send separators with the card number (e.g. 1234-5678… or 1234 5678).
Example: 5123456789012346 or 4557012345678902
Valid length: Between 13 and 16 digits

paymentCardExpiry

This must be MMYY format. The month must be zero padded if it is less than 10.
Example: 0513
Valid length: 4 digits

paymentCardName

This must contain at the very least a space and no less than two characters. Only alphanumeric characters, hyphens, spaces and full stops are allowed.
Example: Mr. Example Person or MR E PERSON or Example Person
Valid length: Between 3 and 255 characters

transactionType

Indicates the type of transaction to perform
Possible values -

  • purchase
  • refund
  • auth
  • capture
transactionAmount

The amount must be formatted to have two decimal places. Any amounts without two decimal places or amounts less than one cent will be rejected.
Example: 10.00

transactionCurrency

One of the following: AUD, CAD, EUR, GBP, JPY, NZD, SGD, USD, FJD, HKD, MYR, THB, IDR, ZAR. This is provider dependent. Please check with MW before attempting to process transactions in any currency other than AUD. This field is case insensitive.
Example: AUD

refundAmount

The amount to refund to the cardholder. The amount must be formatted to have two decimal places. Any amounts without two decimal places or amounts less than one cent will be rejected. transactionID field must also be present for refund to work.
Example: 10.00

captureAmount

The amount to capture from an auth. The amount must be formatted to have two decimal places. Any amounts without two decimal places or amounts less than one cent will be rejected. transactionID field must also be present for capture to work.
Example: 10.00

transactionID

Used to specify the original transaction when transactionType is either refund or capture.
Example: 74-75db9ba2-caf5-11ee-802f-005056a5521a

custom1

Freeform field. Returned as <custom1> in the response.
Valid length: Up to 500 characters

custom2

Freeform field. Returned as <custom2> in the response.
Valid length: Up to 500 characters

custom3

Freeform field. Returned as <custom3> in the response.
Valid length: Up to 500 characters

surcharge

Indicates if the transaction should have a surcharge added
Possible values: 0 or 1

Response CSV Parameters

Parameter Description
Transaction ID

The Merchant Warrior transaction ID
Example: 1600-d400df09-be66-11ee-b58c-005056a5521a

Result

Result of the transaction

Possible values -

  • Fail
  • Success
Amount

Amount of the transaction.
Example: 12.50

Currency

Currency of the transaction.
Example: AUD

Created Date

Date the transaction was created.
Example: 29/01/2024

Created Time

Time the transaction was created.
Example: 16:25:34

Processed Date

Date the transaction was processed.
Example: 29/01/2024

Processed Time

Time the transaction was processed.
Example: 16:25:34

Card Name/Card ID

The name on the card processed. Example: John Smith

Card Number/Card Key

The masked card number processed. Example: 4564xxxxxxxx0004

Custom 1

The value of custom1 in the request CSV.

Custom 2

The value of custom2 in the request CSV.

Custom 3

The value of custom3 in the request CSV.

Store ID

The storeID used for the transaction.

Type

Type of the transaction

Possible values -

  • purchase
  • refund
  • auth
  • capture
MW Response

Merchant Warrior's transaction response.
Example: Transaction approved

Provider Response

The provider's transaction response.
Example: 00 - Approved

Fee Amount

The fee for the transaction.
Example: 0.39

Token Batches

Sample batch files for tokens can be found here.

Request CSV Parameters

Parameter Description
transactionProduct

A product (or sale) id or description. We recommend using an order/product id. This field’s primary purpose is to help the transaction be identifiable for reporting and accounting purposes.
Example: ABC4321
Valid length: Up to 255 characters. Some Acquirers limit this field to 40 characters.

customerName

This field can only contain alphanumeric characters, as well as the full stop, comma, apostrophe, ampersand, space and hyphen characters.
Example: Mr. Example Person
Valid length: Between 2 and 255 characters

customerPhone

The customer's phone number. Anything other than +,-, space and 0-9 will be stripped.
Example: 0401234567 or 61731234567
Valid length: Up to 25 characters

customerEmail

The customer's email.
Example: [email protected]
Valid length: Up to 255 characters

customerCountry

Two letter ISO 3166-1 alpha-2 country code.
Example: AU
Valid length: 2 characters

customerState

Freeform field, keep consistent for your records and reporting.
Example: Queensland
Valid length: Up to 75 characters

customerCity

Freeform field, keep consistent for your records and reporting.
Example: Brisbane
Valid length: Up to 75 characters

customerAddress

Freeform field.
Example: 123 Test Street
Valid length: Up to 255 characters

customerPostCode

This can also accomodate ZIP/Post codes for international transactions.
Example: 4000
Valid length: Between 4 and 10 characters

cardID

A unique alphanumeric string returned by addCard, used to identify a specific card.
Example: NUFM56937091

cardKey

A string used as an encryption/decryption key. This should be unique on a per-card basis. It's used to encrypt the card when we store it. Every time we receive a process card request, the correct cardkey must also be provided - which is known only by you.
Example: a84JI2cA12ziZ3Fx
Valid Length: 16 characters
Required: Conditional - Not required for general use, but required if cardKeyReplace is used

cardKeyReplace

This will replace cardKey for subsequent requests for the cardID if the transaction is run successfully (meaning accepted by Merchant Warrior, not necessarily approved by the bank). This cannot be the same as the last 10 cardKey's used for the cardID, and it has to follow the same guidelines as cardkey (16 character alphanumeric string, etc). See the explanation under "Request Parameter" for more information.
Example: mbnGHOq86sXTjQgd
Valid Length: 16 characters
Required: Conditional - Not required for general use, but required if cardKey is used

transactionType

Indicates the type of transaction to perform
Possible values -

  • purchase
  • refund
  • auth
  • capture
transactionAmount

The amount must be formatted to have two decimal places. Any amounts without two decimal places or amounts less than one cent will be rejected.
Example: 10.00

transactionCurrency

One of the following: AUD, CAD, EUR, GBP, JPY, NZD, SGD, USD, FJD, HKD, MYR, THB, IDR, ZAR. This is provider dependent. Please check with MW before attempting to process transactions in any currency other than AUD. This field is case insensitive.
Example: AUD

refundAmount

The amount to refund to the cardholder. The amount must be formatted to have two decimal places. Any amounts without two decimal places or amounts less than one cent will be rejected. transactionID field must also be present for refund to work.
Example: 10.00

captureAmount

The amount to capture from an auth. The amount must be formatted to have two decimal places. Any amounts without two decimal places or amounts less than one cent will be rejected. transactionID field must also be present for capture to work.
Example: 10.00

transactionID

Used to specify the original transaction when transactionType is either refund or capture.
Example: 74-75db9ba2-caf5-11ee-802f-005056a5521a

custom1

Freeform field. Returned as <custom1> in the response.
Valid length: Up to 500 characters

custom2

Freeform field. Returned as <custom2> in the response.
Valid length: Up to 500 characters

custom3

Freeform field. Returned as <custom3> in the response.
Valid length: Up to 500 characters

surcharge

Indicates if the transaction should have a surcharge added
Possible values: 0 or 1

Response CSV Parameters

Parameter Description
Transaction ID

The Merchant Warrior transaction ID
Example: 1600-d400df09-be66-11ee-b58c-005056a5521a

Result

Result of the transaction

Possible values -

  • Fail
  • Success
Amount

Amount of the transaction.
Example: 12.50

Currency

Currency of the transaction.
Example: AUD

Created Date

Date the transaction was created.
Example: 29/01/2024

Created Time

Time the transaction was created.
Example: 16:25:34

Processed Date

Date the transaction was processed.
Example: 29/01/2024

Processed Time

Time the transaction was processed.
Example: 16:25:34

Card Name/Card ID

The cardID that was processed. Example: HAVC76258115

Card Number/Card Key

The card key that was used. Example: qDKEIwqJuGyWqZSa

Custom 1

The value of custom1 in the request CSV.

Custom 2

The value of custom2 in the request CSV.

Custom 3

The value of custom3 in the request CSV.

Store ID

The storeID used for the transaction.

Type

Type of the transaction

Possible values -

  • purchase
  • refund
  • auth
  • capture
MW Response

Merchant Warrior's transaction response.
Example: Transaction approved

Provider Response

The provider's transaction response.
Example: 00 - Approved

Fee Amount

The fee for the transaction.
Example: 0.39

Direct Debit Batches

Sample batch files for direct debits can be found here.

Request CSV Parameters

Parameter Description
transactionProduct

A product (or sale) id or description. We recommend using an order/product id. This field’s primary purpose is to help the transaction be identifiable for reporting and accounting purposes.
Example: ABC4321
Valid length: Up to 255 characters.

customerName

This field can only contain alphanumeric characters, as well as the full stop, comma, apostrophe, ampersand, space and hyphen characters.
Example: Mr. Example Person
Valid length: Between 2 and 255 characters

customerPhone

The customer's phone number. Anything other than +,-, space and 0-9 will be stripped.
Example: 0401234567 or 61731234567
Valid length: Up to 25 characters

customerEmail

The customer's email.
Example: [email protected]
Valid length: Up to 255 characters

customerCountry

Two letter ISO 3166-1 alpha-2 country code.
Example: AU
Valid length: 2 characters

customerState

Freeform field, keep consistent for your records and reporting.
Example: Queensland
Valid length: Up to 75 characters

customerCity

Freeform field, keep consistent for your records and reporting.
Example: Brisbane
Valid length: Up to 75 characters

customerAddress

Freeform field.
Example: 123 Test Street
Valid length: Up to 255 characters

customerPostCode

This can also accommodate ZIP/Post codes for international transactions.
Example: 4000
Valid length: Between 4 and 10 characters

transactionType

The type of transaction being performed. Must be ddebit for direct debit batches.

transactionAmount

The amount must be formatted to have two decimal places. Any amounts without two decimal places or amounts less than one cent will be rejected.
Example: 10.00

transactionCurrency

One of the following: AUD, NZD. This is provider dependant. Please check with MW before attempting to process transactions in any currency other than AUD. This field is case insensitive.
Example: AUD

custom1

Freeform field. Returned as <custom1> in the response.
Valid length: Up to 500 characters

custom2

Freeform field. Returned as <custom2> in the response.
Valid length: Up to 500 characters

custom3

Freeform field. Returned as <custom3> in the response.
Valid length: Up to 500 characters

paymentAccountBSB

This field must contain 6 digits.
Example: 011123
Valid length: 6 digits

paymentAccountNumber

This must be a valid account number.
Example: 123456789
Valid length: 4-10 digits

paymentAccountName

This must contain at the very least a space and no less than two characters. Only alphanumeric characters, hyphens, spaces and full stops are allowed.
Example: Mr. Example Person or MR E PERSON or Example Person
Valid length: Between 3 and 32 characters

transactionReferenceID

This is a merchant’s unique reference ID for a transaction sent to Merchant Warrior. The main purpose of this ID is to verify the transaction via the queryCard method in the event a valid response is not received.
Example: 0e26df01-1460-4565-894b-e3a16dd53c7a
Valid length: Up to 40 characters
Required: No