Header and trailer

Header and trailer fields:

File

A batch file should be enclosed by a File Header and a File Trailer lines.

Header

Field Number Format Required Description

1

Fixed value: FH

(tick)

Record type identifier

2

Alphanumeric

(tick)

Merchant account name

3

Numeric

(tick)

File submission number

4

Fixed value: FH

(tick)

End-of-record type identifier

Trailer

Field Number Format Required Description

1

Fixed value: FT

(tick)

Record type identifier

2

Alphanumeric

(tick)

Merchant account name

3

Numeric

(tick)

File submission number

4

Numeric

(tick)

Number of blocks in file

5

Fixed value: FT

(tick)

End-of-record type identifier

Example

FH,TestMerchant,201,FH
...
...
FT,TestMerchant,201,1,FT 

Block

A batch file can contain one or more blocks that are defined by a block header and a block trailer. A block groups a number of line items per currency.

Header

Field Number Format Required Description

1

Fixed value: BH

(tick)

Record type identifier

2

Alphanumeric

(tick)

Merchant account name

3

Numeric

(tick)

File submission number

4

Numeric

(tick)

Block number started at 1 and incremented by 1

5

Fixed value: BH

(tick)

End-of-record type identifier

Trailer

Field Number Format Required Description

1

Fixed value: BT

(tick)

Record type identifier

2

Alphanumeric

(tick)

Merchant account name

3

Numeric

(tick)

File submission number

4

Numeric

(tick)

Block number same as the one defined in Block Header

5

Numeric

(tick)

Number of lines records in block

6

Numeric

(tick)

Sum of the line item amounts in block

7

Alphabetic

[A-Z]{3}

(tick)

The three-character ISO currency code.

8

Fixed value: BT

(tick)

End-of-record type identifier

Example

FH,TestMerchant,201,FH
BH,TestMerchant,201,1,BH
...
BT,TestMerchant,201,1,3,4398,EUR,BT
BH,TestMerchant,201,2,BH
...
BT,TestMerchant,201,2,8,2560,USD,BT
FT,TestMerchant,201,2,FT