Você está na página 1de 12

Batch Advantage

File Format Specifications

Merchant Business Solutions


Help Desk 1800 029 749

Contents

1. Introduction

2. Merchant Transmission Service File Format

2.1 MTS Transmission File Structure


2.1.1 File Header

2.1.2 Batch Header

2.1.3 Sales/Refund Transaction

2.1.4 Batch Trailer

2.1.5 File Trailer

2.2 MTS Rejection Report Structure

2.2.2 Batch File Header

2.2.3 Financial Transaction Detail

9
9

3.1 Header Record

10

3.2 Detail Record

10

3.3 Trailer Record

11

4. File Testing Requirements

Batch Advantage File Format Specifications

2.2.1 Deposit File Header

3. Other Batch Format 1

11

1. Introduction

Westpacs Batch Advantage is a secure internet based solution that enables you
to process mail order and telephone order (MOTO) transactions and/or periodic
payments. All transactions are authorised and can either be submitted via a batch
file or as individual transactions. Visa, MasterCard, Bankcard, Amex and Diners
cards are supported.
Qvalent, a fully owned subsidiary of Westpac Banking Corporation, has developed the
Batch Advantage website.
Batch Advantage allows you to submit batch files using the following file formats:
Merchant Transmission Service
Other Batch format 1
This guide outlines the two file format specifications that Batch Advantage supports.

2. Merchant
Transmission
Service File
Format

If you want to use the Merchant Transmission Service (MTS) file format, you must
adopt the following formats.
The data files for MTS are divided into two main types, Transmission file containing
transaction details you send and the Rejection report which shows the rejected
transactions.

2.1 MTS Transmission File Structure


The transmission file has the following general structure:
File header (one only per transmission)
Batch header (per merchant)
Sale/ Refund transaction (one or more in each batch)
Batch trailer (one only per merchant batch header)
File trailer (one only per merchant file header

Westpac Banking Corporation

2. Merchant Transmission
Service File Format
(continued)

2.1.1 File Header


This record identifies the submitter of the file. Only one of these transaction types
is required for each transmission sent to us and it be must be the first record on
the file.
No.

Field Name

Rel.
Posn.

Data
Type

Data
Length

01

Transaction Type

AN

Constant 1 indicates
merchant file header

02

Record Sequence

2-7

Constant 000001 as first


record in file sent

03

Facility Link ID
(previously known
as CDTF ID)

8-11

Facility Link ID allocated by


Westpac

Originating PC ID

12-14

AN

Transmitting PC ID (default
is P01)

Creation Date

15-22

Date YYYYMMDD when file


was created

Creation Sequence

23-24

File Sequence begins at


01 and increments by 1
for each file created on
Creation Date

04

Posting Status

25

AN

O = Original Status

05

Filler

26-80

AN

55

Spaces

Comments

Note: All text characters within the transmission file must be Upper Case and an ASCII EOL character must
be placed after the 80th character in each line. This is for formatting the records into a fixed length record
file. The EOL character should not display when the file is edited.

2.1.2 Batch Header


This record is used to group together data for a particular merchant facility.
No.

Field Name

Rel.
Posn.

Data
Type

Data
Length

01

Transaction Type

AN

Constant 2 indicates
merchant batch header

02

Record Sequence

2-7

Sequentially increased by 1
from the previous record

03

Batch Control:
Merchant Number

8-15

The 8 digit merchant


number allocated by
Westpac

Batch Value Date

16-23

Date YYYYMMDD must be


less than or equal to date
in the header

Batch Sequence

24-25

Batch sequence starting


01 and increasing by 1 for
each batch for merchant
number

04

Posting Status

26

AN

O = Original Status

05

Filler

27-80

AN

54

Spaces

Comments

Note: All text characters within the transmission file must be Upper Case and an ASCII EOL character must
be placed after the 80th character in each line. This is for formatting the records into a fixed length record
file. The EOL character should not display when the file is edited.


Batch Advantage File Format Specifications

2. Merchant Transmission
Service File Format

2.1.3 Sales/ Refund Transaction


One or more of either of these transaction types must be present in each batch.

(continued)
No.

Field Name

Rel.
Posn.

Data
Type

Data
Length

01

Transaction Type

AN

3 indicates sales
4 indicates refund

02

Record Sequence

2-7

Sequentially increased
by 1 from the previous
record

03

Merchant Number

8-15

Same as batch header

04

Card Number

16-34

AN

19

Left justified with trailing


spaces

05

Transaction Date

35-42

Date DDMMYYYY must be


less than or equal to date
in the batch header

06

Transaction
Amount

43-50

8.2

Pic 9(6)V99. Maximum


value is $999,999.99.
Cannot be $0.00

07

Sale Type

51

AN

M Mail order
T Telephone order
E eCommerce
transaction
S Special (no longer
used). System will
default to M for
mail order
R Recurring
transaction

08

POS Terminal
Indicator

52

AN

Leave Blank

09

Authorisation Code

53-58

AN

Blank if not authorised.


Auth code if authorised

10

Merchant Reference 59-64


Number

AN

Free text field

11

Card Expiry Date

65-70

AN

MMYYYY

12

Merchant
Secondary
Reference Number

71-78

AN

Free Text field. This is an


optional field that may
be used by merchants in
addition to the Merchant
Reference Number to
assist in identifying
transactions

13

Filler

79-80

AN

Spaces

Comments

Note:
All text characters within the transmission file must be Upper Case and an ASCII EOL character must be
placed after the 80th character in each line. This is for formatting the records into a fixed length record
file. The EOL character should not display when the file is edited.
For users of the Batch Advantage web interface, the Merchant Reference Number and Merchant Secondary
Reference Number are shown as concatenated in the Reference field on the screen. For example, if the
Merchant Reference Number field is abcde1 and the Merchant Secondary Reference Number is 2fghijkl,
the Reference field on the screen will show abcde12fghijkl. The field is then split back out into the
corresponding Merchant Reference Number and Merchant Secondary Reference Number fields in the MTS
Rejection file.
The Sale Type of R for Recurring transaction (ie MasterCard or Visa Recurring) should be set if a transaction
is a recurring transaction for which you hold a valid direct debit agreement from the cardholder. In
addition, for Visa Recurring, the first transaction has to be authorised with a valid card expiry date. If
the transaction is a one-off transaction, you must set the Sale Type to one of the other given values (ie M,
T or E). Under no circumstances may you flag a one-off transaction as Recurring.
Westpac Banking Corporation

2. Merchant Transmission
Service File Format

2.1.4 Batch Trailer


One of these transactions must exist for each batch header.

(continued)
No.

Field Name

Rel.
Posn.

Data
Type

Data
Length

01

Transaction Type

AN

Constant 5 indicates
batch trailer

02

Record Sequence

2-7

Sequentially increased
by 1 from the previous
record

03

Merchant Number

8-15

Same as batch header

04

Batch transaction
count

16-21

Number of transactions in
the batch

05

Batch transaction
amount

22-31

10.2

Pic 9(8)V99. Maximum


value is $99,999,999.99

06

Batch Amount Sign


indicator

32

AN

C Positive
D Negative

07

Sales Count

33-37

Number of sales
transaction in batch

08

Sales Amount

38-47

10.2

Pic 9(8)V99. Maximum


value is $99,999,999.99

09

Refund Count

48-52

Number of refund
transactions in batch

10

Refund Amount

53-62

10.2

Pic 9(8)V99. Maximum


value is $99,999,999.99

11

Filler

63-80

AN

18

Spaces

Comments

Note: All text characters within the transmission file must be Upper Case and an ASCII EOL character must
be placed after the 80th character in each line. This is for formatting the records into a fixed length record
file. The EOL character should not display when the file is edited.

Batch Advantage File Format Specifications

2. Merchant Transmission
Service File Format

2.1.5 File Trailer


One of these transaction types must exist for the file header.

(continued)
No.

Field Name

Rel.
Posn.

Data
Type

Data
Length

01

Transaction Type

AN

Constant 6 indicates file


trailer

02

Record Sequence

2-7

Sequentially increased
by 1 from the previous
record

03

CDTF/Facility Link
ID

8-11

Same as file header

04

Number of batch

12-15

Number of batches in the


file

05

Transaction Count

16-22

Number of transactions in
the file

06

Transaction
Amount

23-33

11.2

Pic 9(9)V99.
Maximum value is
$999,999,999,999.99

07

File Amount Sign


Indicator

34

AN

C Positive
D Negative

08

Sales Count

35-40

Number of sales
transactions in file

09

Sales Amount

41-51

11.2

Pic 9(9)V99.
Maximum value is
$999,999,999,999.99

10

Refund Count

52-57

Number of refund
transactions in the file

11

Refund Amount

58-68

11.2

Pic 9(9)V99.
Maximum value is
$999,999,999,999.99

11

Filler

69-80

AN

12

Spaces

Comments

Note: All text characters within the transmission file must be Upper Case and an ASCII EOL character must
be placed after the 80th character in each line. This is for formatting the records into a fixed length record
file. The EOL character should not display when the file is edited.

Westpac Banking Corporation

2. Merchant Transmission
Service File Format
(continued)

2.2 MTS Rejection Report Structure


Rejection report identifies the transactions that have been declined or rejected. The
rejection report consists of three different record types.

2.2.1 Deposit File Header


No.

Field Name

Rel.
Posn.

Data
Type

Data
Length

Comments

01

Record Type

Will always be 1

02

Error Code

2-4

000 to 999

03

CDTF/Facility Link
ID

5-8

CDTF/ Facility Link ID

04

Deposit Date

9-14

YYMMDD

05

Deposit Sequence

15-16

File Sequence Number

06

Posting Status

17

AN

O Original

07

Processing Date

18-23

YYMMDD

08

Error Message

24-48

AN

25

Free Form Text

09

Filler

49-110

AN

62

Spaces

2.2.2 Batch File Header

Batch Advantage File Format Specifications

No.

Field Name

Rel.
Posn.

Data
Type

Data
Length

Comments

01

Record Type

Will always be 2

02

Error Code

2-4

000 to 999

03

Merchant Number

5-12

8 digit Wesptac merchant


number

04

Merchant Name

13-37

AN

25

Free Form Text

05

Merchant Location

38-57

AN

20

Free Form Text

06

Merchant State

58-60

AN

Free Form Text

07

Batch Date

61-66

YYMMDD

08

Batch Sequence

67-68

AN

Batch Sequence

09

Posting Status

69

AN

O Original

10

Error Message

70-94

AN

25

Free Form Text

11

Filler

95-110

AN

16

Spaces

2. Merchant Transmission
Service File Format
(continued)

2.2.3 Financial Transaction Detail


No.

Field Name

Rel.
Posn.

Data
Type

Data
Length

Comments

01

Record Type

3 Sales
4 - Refund

02

Error Code

2-4

000 to 999

03

Merchant Number

5-12

8 digit Wesptac merchant


number

04

Card Number

13-31

AN

19

Left justified with trailing


spaces

05

Transaction
Amount

32-42

11

(9)V99

06

Transaction Date

43-48

DDMMYY

07

Trace Details

49-64

AN

16

Westpac Internal Use


Only

08

Merchant Reference 65-70


Number

AN

As allocated in incoming
MTS Transmissin File

09

Filler

71

Westpac Internal Use


Only

10

Authorisation Code

72-77

AN

Currently not used.


Unused value = ******

11

Error Message

78-102

AN

25

Free Form Text

12

Merchant
Secondary
Reference Number

103-110 AN

As allocated in incoming
MTS Transmission File

Note:
All text characters within the transmission file must be Upper Case and an ASCII EOL character must be
placed after the 80th character in each line. This is for formatting the records into a fixed length record
file. The EOL character should not display when the file is edited.
For historical users of the Merchant Transmission Service specification, the Reference Number was
described as positions 49-71 in the format 9999999999999999XXXXXX9 where XXXXX = Merchant
Reference Number in the incoming MTS Transmission Service File. The data positions are unchanged
and therefore merchants using the original specification will not see any change. However the revised
specification above is clearer to understand and corresponds with the incoming format.

3. Other Batch
Format 1

If you want to use the Other Batch Format 1 file format, you must adopt the following
formats.
The same file format is used for the Transmission file and the Rejection report.
The Other Batch Format 1 file should be generated in an ASCII format and consists of
three different record types:
Header record (this is the first record on the file and it includes the merchant
number and name)
Detail record (this record includes the transaction details)
Trailer record (this is the last record on the file and contains the total transaction
count and value)

Westpac Banking Corporation

3. Other Batch Format 1


(continued)

3.1 Header Record


This record identifies the submitter of the file and creation date.
Field Name

Data
Type

Data
Length

Comments

Record Id

AN

Constant H indicates file header

Filler

AN

Space

Creation Date

Creation date
Format: YYYYMMDD

Merchant Number

The 8 digit merchant number


allocated by Westpac padded with a
zero (Right justified)

Merchant Name

AN

21

Merchants trading name

Filler

AN

Space

Value Flag

AN

Will always be Y

Filler

AN

27

Spaces

3.2 Detail Record


This record contains the transaction details.
Field Name

Data
Type

Data
Length

Card Number

16

Cardholder number. (13-digit


card numbers are to be padded
with 3 leading zeroes - e.g.
0001234567890123)

Filler

AN

Space

Expiry Date

Expiry Date format


MMYY e.g. 0508

Filler

AN

Space

Transaction Amount

Pic 9(7)V99. Maximum value is


$9,999,999.99

Filler

AN

Space or insert `- (minus sign) for


refund transactions

Sale type

AN

M Mail order
T Telephone order
E eCommerce transaction
R Recurring transaction

Filler

AN

Space

Authorisation
Response

AN

15

Leave Blank

Reference Number

AN

20

Free Form Text

Filler

AN

Space

Filler

AN

Spaces

Comments

Note: The Sale Type of R for Recurring transaction (ie MasterCard or Visa Recurring) should be set
if a transaction is a recurring transaction for which you hold a valid direct debit agreement from the
cardholder. In addition, for Visa Recurring, the first transaction has to be authorised with a valid card
expiry date. If the transaction is a one-off transaction, you must set the Sale Type to one of the other
given values (ie M, T or E). Under no circumstances may you flag a one-off transaction as Recurring.
10

Batch Advantage File Format Specifications

3. Other Batch Format 1


(continued)

4. File Testing
Requirements

3.3 Trailer Record


This record contains the transaction count, value submitted and value approved.
Field Name

Data
Type

Data
Length

Comments

Record Id

AN

Constant T indicates file trailer

Filler

AN

Space

Transaction Count

Number of transactions in file

Filler

An

Space

Value Submitted

11

Leave Blank. Value will be populated


after processing

Filler

AN

Space

Value Creation Title

AN

22

Will always be TOTAL VALUE


CREATED IS

Filler

AN

Space

Value Created

11

Leave Blank. Value will be populated


after processing

Batch Advantage has built-in the validation rules which will check each file when they
are uploaded into the website.
There is no need to test the batch file before you submit production files if you
diligently follow the file format specifications.

Westpac Banking Corporation

11

Westpac Banking Corporation ABN 33 007 457 141


2006 Westpac Banking Corporation

GD6568(2/06)

Você também pode gostar