Open Wallet

Depending on the wallet provider, this operation initiates a wallet interaction.

For the MasterPass Online wallet, use this operation to initiate a wallet interaction. You reference the MasterPass JavaScript client library in your page, and use the response parameters from this operation in the checkoutButton method to open the MasterPass lightbox. The gateway will manage all of the back-end interactions with MasterCard.

URL https://paymentgateway.commbank.com.au/api/rest/version/78/merchant/{merchantId}/session/{sessionId}
HTTP Method POST
Authentication This operation requires authentication via one of the following methods:
  • Certificate authentication.
  • Basic HTTP authentication as described at w3.org. Provide 'merchant.<your gateway merchant ID>' in the userid portion and your API password in the password portion.

Request Parameters

order   = COMPULSORY

order
Fixed value

order.walletProvider  Enumeration = COMPULSORY

Existence
COMPULSORY
Fixed value
Validation Rules
JSON type
String
Value must be a member of the following list. The values are case sensitive.
AMEX_EXPRESS_CHECKOUT
Amex Express Checkout wallet provider.
APPLE_PAY
Apple Pay mobile wallet provider.
CHASE_PAY
Chase Pay wallet provider.
GOOGLE_PAY
Google Pay mobile wallet provider.
MASTERPASS_ONLINE
MasterPass Online wallet provider.
SAMSUNG_PAY
Samsung Pay mobile wallet provider.
VISA_CHECKOUT
Visa Checkout wallet provider.

correlationId  String = OPTIONAL

The value provided is not validated, does not persist in the gateway, and is returned as provided in the response to the request.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
XSD type
string
minimum length
1
maximum length
100

order   = COMPULSORY

order
Fixed value

order.amount  Decimal = OPTIONAL

The value of this field in the response is zero if payer funds are not transferred.
Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.cashbackAmount  Decimal = OPTIONAL

The cash back amount is included in the total amount of the order you provide in order.amount.

This field corresponds to EMV tag 9F03
Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.currency  Upper case alphabetic text = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data must consist of the characters A-Z
JSON type
String
minimum length
3
maximum length
3

order.description  String = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
127

order.discount   = OPTIONAL

For example, you may apply discounts for trade, employees, bulk purchase, or a sales promotion.
Fixed value

order.discount.amount  Decimal = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.discount.code  String = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
40

order.discount.description  String = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
127

order.dutyAmount  Decimal = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a decimal number.
JSON type
Number
maximum value
1000000000000
minimum value
0
maximum post-decimal digits
3

order.gratuityAmount  Decimal = OPTIONAL

The gratuity amount is included in the total amount of the order you provide in order.amount.
Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.item[n]   = OPTIONAL

Information about the items the payer purchases with the order.
Fixed value

order.item[n].brand  String = OPTIONAL

For example, Dell.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
127

order.item[n].category  String = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
127

order.item[n].description  String = OPTIONAL

For example, 'Color:Red, Size:M'
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
127

order.item[n].detail   = OPTIONAL

Check with your payment service provider if Level 3 data is supported for your acquirer.
Fixed value

order.item[n].detail.acquirerCustom  JSON Text = OPTIONAL

Data must be provided in JSON format using the record name and field name (separated by a comma) to identify the value provided. Contact your payment service provider for details about the supported fields including the field definitions.
Existence
OPTIONAL
Fixed value
Validation Rules
Data is valid Json Format
JSON type
String
minimum length
1
maximum length
4000

order.item[n].detail.commodityCode  Digits = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a number between 1 and 9999999999999999 represented as a string.
JSON type
String

order.item[n].detail.tax[n]   = OPTIONAL

Information about the taxes per line item.
Fixed value

order.item[n].detail.tax[n].amount  Decimal = OPTIONAL

Note that the tax amount provided must reflect the tax amount applied before a discount was applied.
Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9, '.' and '-' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.item[n].detail.tax[n].rate  Decimal = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
6

order.item[n].detail.tax[n].type  String = OPTIONAL

The correct value as used by your acquirer may have to be provided. Contact your payment service provider for details.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
127

order.item[n].detail.unitDiscountRate  Decimal = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
6

order.item[n].detail.unitTaxRate  Decimal = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
6

order.item[n].detail.unitTaxType  String = OPTIONAL

The correct value as used by your acquirer may have to be provided. Contact your payment service provider for details.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
10

order.item[n].detail.unspsc  Digits = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a number between 1 and 9999999999999999 represented as a string.
JSON type
String

order.item[n].detail.upc  Digits = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a number between 1 and 9999999999999999 represented as a string.
JSON type
String

order.item[n].industryCategory  Enumeration = OPTIONAL

Such processing might have legal obligations, which are your responsibility. Do not provide an industry category, unless you are certain it applies to you, and is accepted by your acquirer.

We support the following industry standard processing:

US health care processing using the IIAS standard.

The supported values for this field are:

HEALTHCARE_VISION, HEALTHCARE_DENTAL, HEALTHCARE_PRESCRIPTION, HEALTHCARE_OTHER

We formulate an IIAS message by summing the amounts of all the line items with the same industry category. The amount of a line item is computed as:

(order.item.unitPrice + order.item.tax) * order.item.quantity
Existence
OPTIONAL
Fixed value
Validation Rules
JSON type
String
Value must be a member of the following list. The values are case sensitive.
HEALTHCARE_DENTAL
HEALTHCARE_OTHER
HEALTHCARE_PRESCRIPTION
HEALTHCARE_VISION

order.item[n].name  String = COMPULSORY

Existence
COMPULSORY
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
127

order.item[n].quantity  Decimal = COMPULSORY

Existence
COMPULSORY
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number greater than zero.
JSON type
String
minimum length
0
maximum length
30

order.item[n].sku  String = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
127

order.item[n].unitDiscountAmount  Decimal = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9, '.' and '-' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.item[n].unitOfMeasure  String = OPTIONAL

The correct value as used by your acquirer may have to be provided. Contact your payment service provider for details.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
10

order.item[n].unitPrice  Decimal = COMPULSORY

This amount is multiplied with the item quantity (item.quantity) to determine the total amount for this item (item.amount). This amount does not include the tax amount and/or discount amount applicable to this item.
Existence
COMPULSORY
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9, '.' and '-' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.item[n].unitTaxAmount  Decimal = OPTIONAL

This amount is multiplied with the item quantity (item.quantity) to determine the total tax amount for this item.
Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9, '.' and '-' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.itemAmount  Decimal = OPTIONAL

If you do not provide this value but provide line item data, then this amount is calculated as the sum of the item.quantity times the item.unitPrice for all the line items (total item amount).
If you provide both this value and line item data, then the order.itemAmount MUST equal the total item amount.
Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.shippingAndHandlingAmount  Decimal = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.shippingAndHandlingTaxAmount  Decimal = OPTIONAL

This amount is included in the shipping and handling amount provided in field order.shippingAndHandlingAmount.
Existence
OPTIONAL
Fixed value
Validation Rules
Data is a decimal number.
JSON type
Number
maximum value
1000000000000
minimum value
0
maximum post-decimal digits
3

order.shippingAndHandlingTaxRate  Decimal = OPTIONAL

For a tax rate of 2.5% provide 0.025.
Existence
OPTIONAL
Fixed value
Validation Rules
Data is a decimal number.
JSON type
Number
maximum value
1000000000000000000
minimum value
0
maximum post-decimal digits
4

order.tax[n]   = OPTIONAL

Use this parameter group to provide a breakdown of tax types, amount per tax type, and rate per tax type included in order.taxAmount.
Fixed value

order.tax[n].amount  Decimal = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.tax[n].rate  Decimal = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
6

order.tax[n].type  String = OPTIONAL

The correct value as used by your acquirer may have to be provided. Contact your payment service provider for details.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
50

order.taxAmount  Decimal = OPTIONAL

If you do not provide this value but provide line item data, then this amount is calculated as the sum of the item.quantity times the item.unitTaxAmount for all the line items (total tax amount).
If you provide both this value and line item data, then the order.taxAmount MUST equal the total tax amount.
Existence
OPTIONAL
Fixed value
Validation Rules
Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.
JSON type
String
minimum length
1
maximum length
14

order.transactionFiltering   = OPTIONAL

Information relevant for Transaction Filtering.
Fixed value

order.transactionFiltering.avsResponseCodeRules[n]   = OPTIONAL

If provided, these rules override the AVS Response Code Transaction Filtering rules you have configured in Merchant Administration.
Fixed value

order.transactionFiltering.avsResponseCodeRules[n].action  Enumeration = COMPULSORY

Existence
COMPULSORY
Fixed value
Validation Rules
The action to be performed for the Address Verification Service (AVS) Response Code.
JSON type
String
Value must be a member of the following list. The values are case sensitive.
NO_ACTION
No action should be taken by the gateway.
REJECT
The gateway must reject the transaction.
REVIEW
The gateway must mark this transaction as requiring a review.

order.transactionFiltering.avsResponseCodeRules[n].avsResponseCode  Enumeration = COMPULSORY

Existence
COMPULSORY
Fixed value
Validation Rules
The Address Verification Service (AVS) Response Code for which you are defining the rule.
JSON type
String
Value must be a member of the following list. The values are case sensitive.
ADDRESS_MATCH
Street address matched
ADDRESS_ZIP_MATCH
Street address and zip/postcode were matched
NAME_ADDRESS_MATCH
Card holder name and street address matched
NAME_MATCH
Card holder name matched
NAME_ZIP_MATCH
Card holder name and zip/postcode matched
NOT_AVAILABLE
No data available from issuer or AVS data not supported for transaction
NOT_REQUESTED
AVS not requested
NOT_VERIFIED
AVS could not be verified for an international transaction
NO_MATCH
No match
SERVICE_NOT_AVAILABLE_RETRY
Issuer system is unavailable. Retry can be attempted
SERVICE_NOT_SUPPORTED
Service currently not supported by acquirer or merchant
ZIP_MATCH
Zip/postcode matched. Street address not matched

order.walletProvider  Enumeration = COMPULSORY

Existence
COMPULSORY
Fixed value
Validation Rules
JSON type
String
Value must be a member of the following list. The values are case sensitive.
AMEX_EXPRESS_CHECKOUT
Amex Express Checkout wallet provider.
APPLE_PAY
Apple Pay mobile wallet provider.
CHASE_PAY
Chase Pay wallet provider.
GOOGLE_PAY
Google Pay mobile wallet provider.
MASTERPASS_ONLINE
MasterPass Online wallet provider.
SAMSUNG_PAY
Samsung Pay mobile wallet provider.
VISA_CHECKOUT
Visa Checkout wallet provider.

session.version  ASCII Text = OPTIONAL

Do this if you make business decisions based on data from the session and wish to ensure that the same data is being used for the request operation.

To use optimistic locking, record session.version when you make your decisions, and then pass that value in session.version when you submit your request operation to the gateway.

If session.version provided by you does not match that stored against the session, the gateway will reject the operation with error.cause=INVALID_REQUEST.

See Making Business Decisions Based on Session Content.
Existence
OPTIONAL
Fixed value
Validation Rules
Data consists of ASCII characters
JSON type
String
minimum length
10
maximum length
10

wallet.masterpass   = OPTIONAL

Information about the payer's MasterPass wallet.
Fixed value

wallet.masterpass.originUrl  Url = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Ensure that this is a valid URL according to RFC 1738.
JSON type
String

wallet.masterpass.secondaryOriginUrl  Url = OPTIONAL

Provide this field only when the Lightbox will be invoked from a frame that's on a merchant site, and when that frame has a different domain than the merchant site.
Existence
OPTIONAL
Fixed value
Validation Rules
Ensure that this is a valid URL according to RFC 1738.
JSON type
String

{merchantId}  Alphanumeric + additional characters COMPULSORY

Existence
COMPULSORY
Validation Rules
Data may consist of the characters 0-9, a-z, A-Z, '-', '_'
XSD type
string
minimum length
1
maximum length
40

{sessionId}  ASCII Text COMPULSORY

Existence
COMPULSORY
Validation Rules
Data consists of ASCII characters
XSD type
string
minimum length
31
maximum length
35

Response Parameters

merchant  Alphanumeric + additional characters = Always Provided

Existence
Always Provided
Fixed value
Validation Rules
Data may consist of the characters 0-9, a-z, A-Z, '-', '_'
JSON type
String
minimum length
1
maximum length
40

order   = Always Provided

order
Fixed value

order.walletProvider  Enumeration = Always Provided

Existence
Always Provided
Fixed value
Validation Rules
JSON type
String
Value must be a member of the following list. The values are case sensitive.
AMEX_EXPRESS_CHECKOUT
Amex Express Checkout wallet provider.
APPLE_PAY
Apple Pay mobile wallet provider.
CHASE_PAY
Chase Pay wallet provider.
GOOGLE_PAY
Google Pay mobile wallet provider.
MASTERPASS_ONLINE
MasterPass Online wallet provider.
SAMSUNG_PAY
Samsung Pay mobile wallet provider.
VISA_CHECKOUT
Visa Checkout wallet provider.

result  Enumeration = Always Provided

Existence
Always Provided
Fixed value
Validation Rules
JSON type
String
Value must be a member of the following list. The values are case sensitive.
ERROR
ERROR
SUCCESS
SUCCESS

session.id  ASCII Text = Always Provided

The payment details collected at the wallet provider will be stored against this session.
Existence
Always Provided
Fixed value
Validation Rules
Data consists of ASCII characters
JSON type
String
minimum length
31
maximum length
35

session.version  ASCII Text = Always Provided

Do this if you make business decisions based on data from the session and wish to ensure that the same data is being used for the request operation.

To use optimistic locking, record session.version when you make your decisions, and then pass that value in session.version when you submit your request operation to the gateway.

See Making Business Decisions Based on Session Content.
Existence
Always Provided
Fixed value
Validation Rules
Data consists of ASCII characters
JSON type
String
minimum length
10
maximum length
10

wallet.amexExpressCheckout   = CONDITIONAL

Response fields from Amex Express Checkout Wallet operation.
Fixed value

wallet.amexExpressCheckout.encryptedData  Base64 = CONDITIONAL

You must provide this when you invoke the Amex Express Checkout interaction.
Existence
CONDITIONAL
Fixed value
Validation Rules
Data is Base64 encoded
JSON type
String
minimum length
1
maximum length
5120

wallet.masterpass   = CONDITIONAL

Response fields from MasterPass Open Wallet operation.
Fixed value

wallet.masterpass.allowedCardTypes  String = CONDITIONAL

You provide this value when you initiate a MasterPass interaction to limit the card types that the payer can select to those supported by the merchant.
Existence
CONDITIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
255

wallet.masterpass.merchantCheckoutId  String = CONDITIONAL

You provide this value on order to initiate a MasterPass interaction.
Existence
CONDITIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
255

wallet.masterpass.originUrl  Url = CONDITIONAL

Existence
CONDITIONAL
Fixed value
Validation Rules
Ensure that this is a valid URL according to RFC 1738.
JSON type
String

wallet.masterpass.requestToken  String = CONDITIONAL

You provide this value in order to initiate a MasterPass interaction.
Existence
CONDITIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
255

wallet.masterpass.secondaryOriginUrl  Url = CONDITIONAL

Provide this field only when the Lightbox will be invoked from a frame that's on a merchant site, and when that frame has a different domain than the merchant site.
Existence
CONDITIONAL
Fixed value
Validation Rules
Ensure that this is a valid URL according to RFC 1738.
JSON type
String

wallet.visaCheckout   = CONDITIONAL

Response fields from Visa Checkout Open Wallet operation.
Fixed value

wallet.visaCheckout.cardArts  String = CONDITIONAL

Existence
CONDITIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
200

wallet.visaCheckout.cardBrand  String = CONDITIONAL

Existence
CONDITIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
50

Response parameters are the same as Session: Retrieve Session

error   = CONDITIONAL

Information on possible error conditions that may occur while processing an operation using the API.
Fixed value

error.cause  Enumeration = CONDITIONAL

For example, errors may occur due to invalid requests or internal system failures.
Fixed value
Validation Rules
JSON type
String
Value must be a member of the following list. The values are case sensitive.
INVALID_REQUEST
The request was rejected because it did not conform to the API protocol.
REQUEST_REJECTED
The request was rejected due to security reasons such as firewall rules, expired certificate, etc.
SERVER_BUSY
The server did not have enough resources to process the request at the moment.
SERVER_FAILED
There was an internal system failure.

error.explanation  String = CONDITIONAL

This field is returned only if the cause is INVALID_REQUEST or SERVER_BUSY.
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
1000

error.field  String = CONDITIONAL

This field is returned only if the cause is INVALID_REQUEST and a field level validation error was encountered.
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
100

error.supportCode  String = CONDITIONAL

This field is returned only if the cause is SERVER_FAILED or REQUEST_REJECTED.
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
100

error.validationType  Enumeration = CONDITIONAL

This field is returned only if the cause is INVALID_REQUEST and a field level validation error was encountered.
Fixed value
Validation Rules
JSON type
String
Value must be a member of the following list. The values are case sensitive.
INVALID
The request contained a field with a value that did not pass validation.
MISSING
The request was missing a mandatory field.
UNSUPPORTED
The request contained a field that is unsupported.

result  Enumeration = CONDITIONAL

Fixed value
Validation Rules
JSON type
String
Value must be a member of the following list. The values are case sensitive.
ERROR
The operation resulted in an error and hence cannot be processed.

Copyright © 2023 Commonwealth Bank of Australia