Skip to main content

CSV2 payment upload file

The CSV payment upload file is sent to process a batch of payments. The system responds with a CSV2 payment response report.

File format

The current version of this file format is 2.

To upload a payment file in this format you must send the parameter format as CSV2.

If we make any backwards incompatible changes we will release a new version of this file.

The following changes will not result in a new CSV version:

  • Adding new optional columns to the end of the line.
  • Changing the name of column headings.
  • Improved error reporting when an invalid request is received.

Your software must be written to handle these types of changes.

Record types

The structure of a CSV payment file is:

  • One header record
  • One or more transaction records
  • One trailer record

There are 3 different payment record types. QuickStream reorders the payment lines in the file into batches by Record Type, Supplier Business Code and Currency. Each batch of transactions are processed separately.

Record Type Description Comment
H File Header Record One record per file. A file will consist of a mixture of one or more payments.
C Card Transaction Record One record per Card transaction.
P PayTo Transaction Record One record per PayTo transaction.
B Australian Bank Account Transaction Record One record per Australian Bank Account transaction.
N New Zealand Bank Account Transaction Record One record per New Zealand Bank Account payment.
T File Trailer Record One record per file.

H - File header record

Field Number Field Name Min/Max Length Required Format Description
1 Record Type 1/1 Yes H Record Type.
2 Community Code 3/20 Yes Alphanumeric The Community Code uniquely identifies your QuickStream facility.
3 File Date 10/10 Yes Date CCYY-MM-DD The date that the file is sent for processing. A file with a past date is automatically sent for processing.
4 Version 1/1 Yes 2 This field must be present with the value of 2.

C - Card transaction record

Field Number Field Name Min/Max Length Required Format Description
1 Record Type 1/1 C Record Type.
2 Supplier Business Code 3/20 Yes Alphanumeric The Supplier Business code uniquely identifies a Business and Settlement Account in your facility.
3 Transaction Type 6/7 Yes PAYMENT or REFUND The type of transaction.
4 Currency 3/3 Yes AUD or NZD The currency.
5 Amount 1/11 Yes Numeric DDDDDDDD.CC The amount of the transaction. E.g. 13.50.
6 Customer Reference Number 1/100 Yes ASCII characters A unique identifier for your customer.
7 Payment Reference Number 1/100 Yes ASCII characters Your reference for this transaction.
8 Original Receipt Number 8/15 Yes when the Transaction Type is REFUND Numeric For a refund, use the receipt number of the transaction you wish to refund. For a payment, leave this blank.
9 Account Token 1/20 Yes, when not providing Card details. ASCII characters The account token represents an enabled Card account. When an account token is provided, you should not provide any other card details.
10 Customer Number 1/100 Yes, when not providing the Account Token or Card details. ASCII characters When provided, the default account for this Customer is used. Note that the customer must be pre-registered with an enabled and default card account.
11 Cardholder Name 1/100 No Alphanumeric Name printed on the card.
12 Card Number 13/19 Yes when not provided the Account Token or Customer Number Numeric Digits printed on the card. If you are using an Account Token or Customer Number, do not provide this field.
13 Expiry Date Month 2/2 Yes when Card Number is provided. Numeric MM Two-digit expiry month.
14 Expiry Date Year 4/4 Yes when Card Number is provided. Numeric YYYY Four-digit expiry year.
15 POS Entry Mode 6/17 No MANUAL or STORED_CREDENTIAL Identifies how the card number was obtained.

MANUAL - The card number was manually entered.
STORED_CREDENTIAL - The card number is stored by the merchant or gateway to process future payments.
Defaults to STORED_CREDENTIAL for payments using tokenised accounts, otherwise MANUAL.
16 Stored Credential Usage 10/15 No INSTALMENT, RECURRING, UNSCHEDULED_CIT, UNSCHEDULED_MIT Identifies the purpose of a stored card number.

INSTALMENT - A transaction in a fixed series of transactions for a single purpose of goods or services.
RECURRING - A transaction in a series of transactions that are processed at fixed, regular intervals (not to exceed one year between transactions) for the purchase of goods or services provided at regular intervals.
UNSCHEDULED_CIT - A cardholder-initiated unscheduled transaction (which does not occur on a scheduled or regularly occurring transaction date).
UNSCHEDULED_MIT- A merchant-initiated unscheduled transaction (which does not occur on a scheduled or regularly occurring transaction date). The transaction is initiated by the merchant without active participation of the cardholder (e.g. account top-up).

Defaults to RECURRING when ECI is REC or INSTALMENT when ECI is INS. Otherwise this field defaults to UNSCHEDULED_MIT.
17 Soft Descriptor Merchant Name 1/22 Yes when other Soft Descriptor fields are provided. ASCII characters Required for Australian Aggregator merchants only. Must be in the format AggregatorName*SubmerchantName. AggregatorName must be 3 characters.
18 Soft Descriptor Merchant Street Address 1/48 Yes when other Soft Descriptor fields are provided. ASCII characters Required for Australian Aggregator merchants only. The street address of the sub-merchant trading address. It is a scheme requirement for Aggregator Merchants to populate the street address as part of the payment.
19 Soft Descriptor Merchant Location 1/13 Yes when other Soft Descriptor fields are provided. ASCII characters Required for Australian Aggregator merchants only. The city or suburb of the sub-merchants trading address.
20 Soft Descriptor Merchant State 2/3 Yes when other Soft Descriptor fields are provided. NSW, ACT, VIC, QLD, NT, SA, WA, TAS Required for Australian Aggregator merchants only. The state of the sub-merchants trading address.
21 Soft Descriptor Merchant Country 2/2 Yes when other Soft Descriptor fields are provided. AU Required for Australian Aggregator merchants only. The sub-merchant must be registered in Australia and have a presence and process payments within Australia.
22 Soft Descriptor Postcode 4/4 Yes when other Soft Descriptor fields are provided. Numeric DDDD Required for Australian Aggregator merchants only. The postal code of the sub-merchant trading address.
23 Soft Descriptor Sub-merchant ID 3/15 No ASCII characters Required for Australian Aggregator merchants only. A unique identifier for your sub-merchant. The aggregator allocates the sub-merchant identifier. Westpac does not allocate this value.

The following are sample records for Card transactions.

H,COMMUNITYCODE,2023-01-01,2
C,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERA,PAYMENTA,,,,"Aya James",4242424242424242,11,2026
C,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERA,PAYMENTB,,,,"Basma Abadi",4242424242424242,11,2026,REC,STORED_CREDENTIAL,RECURRING
C,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERA,PAYMENTC,,,,"Basma Abadi",4242424242424242,11,2026,REC,STORED_CREDENTIAL,RECURRING,"BASMA ABADI","123 MY STREET","SYDNEY",NSW,AU,2000,BAS*SYDNEY
C,SUPPLIER2,PAYMENT,NZD,1.00,CUSTOMERA,PAYMENTD,,,,"Aya James",4242424242424242,11,2026
C,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERA,PAYMENTE,,CODE-123456789
C,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERA,PAYMENTF,,,MYCUSTOMERA
C,SUPPLIER1,REFUND,AUD,1.00,CUSTOMERA,PAYMENTG,123456789
T,7,6.00,1.00

P - PayTo transaction record

Field Number Field Name Min/Max Length Required Format Description
1 Record Type 1/1 P Record Type.
2 Supplier Business Code 3/20 Yes Alphanumeric The Supplier Business code uniquely identifies a Business and Settlement Account in your facility.
3 Transaction Type 6/7 Yes PAYMENT or REFUND The type of transaction.
4 Currency 3/3 Yes AUD The currency.
5 Amount 1/11 Yes Numeric DDDDDDDD.CC The amount of the transaction. E.g. 13.50.
6 Customer Reference Number 1/100 Yes ASCII characters A unique identifier for your customer.
7 Payment Reference Number 1/100 Yes ASCII characters Your reference for this transaction.
8 Original Receipt Number 8/15 Yes when the Transaction Type is REFUND Numeric For a refund, use the receipt number of the transaction you wish to refund. For a payment, leave this blank.
9 Agreement Token 1/20 Yes when the Transaction Type is PAYMENT ASCII characters For a payment, the PayTo Agreement Token this payment is for. For a refund, leave this blank.
10 End-to-end ID 1/35 No ASCII characters For a payment, a unique identification is assigned by the initiating party to unambiguously identify the transaction. This identification is passed on, unchanged, throughout the entire end-to-end chain. When not provided, this field will be the Receipt Number. For a refund, leave this blank.
11 Remittance Information 1 1/140 No ASCII characters For a payment, information supplied to enable the matching/reconciliation of a transaction with the items that the payment is intended to settle, such as commercial invoices in an accounts receivable system, in an unstructured form. For a refund, leave this blank.
12 Remittance Information 2 1/140 No ASCII characters As above.

The following are sample records for PayTo transactions.

H,COMMUNITYCODE,2023-03-08,2
P,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERA,PAYMENTA,,TOKENA,END-TO-END-IDA,"REMITTANCE INFORMATION 1","REMITTANCE INFORMATION 2"
P,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERB,PAYMENTB,,TOKENB,END-TO-END-IDC,"REMITTANCE INFORMATION 1"
P,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERC,PAYMENTB,,TOKENC,END-TO-END-IDC
P,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERD,PAYMENTB,,TOKEND
P,SUPPLIER1,REFUND,AUD,1.00,CUSTOMERE,REFUNDA,987654321
T,5,4.00,1.00

B - Australian Bank Account transaction record

Field Number Field Name Min/Max Length Required Format Description
1 Record Type 1/1 B Record Type.
2 Supplier Business Code 3/20 Yes Alphanumeric The Supplier Business code uniquely identifies a Business and Settlement Account in your facility.
3 Transaction Type 6/7 Yes PAYMENT or REFUND The type of transaction.
4 Currency 3/3 Yes AUD or NZD The currency.
5 Amount 1/11 Yes Numeric DDDDDDDD.CC The amount of the transaction. E.g. 13.50.
6 Customer Reference Number 1/100 Yes ASCII characters A unique identifier for your customer.
7 Payment Reference Number 1/100 Yes ASCII characters Your reference for this transaction.
8 Original Receipt Number 8/15 Yes when the Transaction Type is REFUND Numeric For a refund, use the receipt number of the transaction you wish to refund. For a payment, leave this blank.
9 Account Token 1/20 Yes, when not providing Card details. ASCII characters The account token represents an enabled Card account. When an account token is provided, you should not provide any other card details.
10 Customer Number 1/100 Yes, when not providing the Account Token or Card details. ASCII characters When provided, the default account for this Customer is used. Note that the customer must be pre-registered with an enabled and default card account.
11 Account Name 1/100 No ASCII characters Name of the account holder.
12 BSB 6/7 Yes when not providing the Account Token or Customer Number BBS-SBB The bank-state-branch holding their account.
13 Account Number 6/9 Yes when BSB is provided Numeric The account number at that branch.

The following are sample records for Australian Bank Account transactions.

H,COMMUNITYCODE,2023-03-08,2
B,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERA,PAYMENTA,,,,"Aya James",032-002,123465
B,SUPPLIER1,PAYMENT,AUD,1.00,CUSTOMERA,PAYMENTB,,CODE-123456789
B,SUPPLIER2,PAYMENT,AUD,1.00,CUSTOMERA,PAYMENTC,,,MYCUSTOMERA
B,SUPPLIER2,REFUND,AUD,1.00,CUSTOMERA,PAYMENTD,123456789
T,4,3.00,1.00

N - New Zealand Bank Account transaction record

Field Number Field Name Min/Max Length Required Format Description
1 Record Type 1/1 N Record Type.
2 Supplier Business Code 3/20 Yes Alphanumeric The Supplier Business code uniquely identifies a Business and Settlement Account in your facility.
3 Transaction Type 7/7 Yes PAYMENT The type of transaction.
4 Currency 3/3 Yes AUD or NZD The currency.
5 Amount 1/11 Yes Numeric DDDDDDDD.CC The amount of the transaction. E.g. 13.50.
6 Customer Reference Number 1/100 Yes ASCII characters A unique identifier for your customer.
7 Payment Reference Number 1/100 Yes ASCII characters Your reference for this transaction.
8 Account Token 1/20 Yes, when not providing account details. ASCII characters The account token represents an enabled account. When an account token is provided, you should not provide any other account details.
9 Customer Number 1/100 Yes, when not providing the Account Token or account details. ASCII characters When provided, the default account for this Customer is used. Note that the customer must be pre-registered with an enabled and default account.
10 Account Name 1/100 No ASCII characters Name of the account holder.
11 Bank Code 2/2 Yes when not providing the Account Token or Customer Number Numeric The bank code holding their account.
12 Branch Code 4/4 Yes when Bank Code is provided Numeric The branch holding their account.
13 Account Number 6/7 Yes when Bank Code is provided Numeric The account number at that branch.
14 Account Suffix 2/3 Yes when Bank Code is provided Numeric The account suffix.

The following are sample records for New Zealand Bank Account transactions.

H,COMMUNITYCODE,2023-03-08,2
N,SUPPLIER1,PAYMENT,NZD,1.00,CUSTOMERA,PAYMENTA,,,"Aya James",03,0175,0224604,004
N,SUPPLIER1,PAYMENT,NZD,1.00,CUSTOMERA,PAYMENTB,CODE-123456789
N,SUPPLIER2,PAYMENT,NZD,1.00,CUSTOMERA,PAYMENTC,,MYCUSTOMERA
T,3,3.00,0.00

T - File trailer record

Field Number Field Name Min/Max Length Required Format Description
1 Record Type 1/1 Yes T Record Type.
2 Total Transaction Record Count 1/10 Yes Numeric The total number of payment records in the file (excluding H and T records).
3 Total Payment Amount 1/15 Yes Numeric DDD.CC The total amount of all payments in the file. This must be the sum of all Amount fields when the Transaction Type is PAYMENT.
3 Total Refund Amount 1/15 Yes Numeric DDD.CC The total amount of all refunds in the file. This must be the sum of all Amount fields when the Transaction Type is REFUND.
Westpac Privacy Statement

Privacy Statement (for individuals whose personal information may be collected - in this clause referred to as "you"). All personal information we collect about you is collected, used and disclosed by us in accordance with our Privacy Statement which is available at Privacy Statement or by calling us through your relationship manager or Westpac representative. Our Privacy Statement also provides information about how you can access and correct your personal information and make a complaint. You do not have to provide us with any personal information but, if you don't, we may not be able to process an application or a request for a product or service.