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://ap-gateway.mastercard.com/api/nvp/version/78
HTTP Method POST
Authentication This operation requires authentication via one of the following methods:
  • Certificate authentication.
  • To authenticate to the API two additional NVP parameters must be supplied in the request. Provide 'merchant.<your gateway merchant ID>' in the apiUsername field and your API password in the apiPassword field.

Request Parameters

apiOperation  String =OPEN_WALLET FIXED

Existence
FIXED
Fixed value
OPEN_WALLET
Validation Rules
Any sequence of zero or more unicode characters.
XSD type
string

merchant  Alphanumeric + additional characters = COMPULSORY

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

order   = COMPULSORY

order
Fixed value

order.walletProvider  Enumeration = COMPULSORY

Existence
COMPULSORY
Fixed value
Validation Rules
XSD 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.id  ASCII Text = COMPULSORY

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

apiOperation  String =OPEN_WALLET FIXED

Existence
FIXED
Fixed value
OPEN_WALLET
Validation Rules
Any sequence of zero or more unicode characters.
XSD type
string

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

merchant  Alphanumeric + additional characters = COMPULSORY

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

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.
XSD 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.
XSD 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
XSD type
string
minimum length
3
maximum length
3

order.description  String = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
XSD 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.
XSD 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
XSD 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
XSD type
string
minimum length
1
maximum length
127

order.dutyAmount  Decimal = OPTIONAL

Existence
OPTIONAL
Fixed value
Validation Rules
A sequence of digits 0-9 separated by a '.' as a decimal indicator. Leading and trailing zeroes are optional. If the fractional part is zero, the '.' and following zero(es) can be omitted. (For a complete description, see http://www.w3.org/TR/xmlschema-2/#decimal.)
XSD type
decimal
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.
XSD 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.
XSD 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
A sequence of digits 0-9 separated by a '.' as a decimal indicator. Leading and trailing zeroes are optional. If the fractional part is zero, the '.' and following zero(es) can be omitted. (For a complete description, see http://www.w3.org/TR/xmlschema-2/#decimal.)
XSD type
decimal
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
A sequence of digits 0-9 separated by a '.' as a decimal indicator. Leading and trailing zeroes are optional. If the fractional part is zero, the '.' and following zero(es) can be omitted. (For a complete description, see http://www.w3.org/TR/xmlschema-2/#decimal.)
XSD type
decimal
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.
XSD 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.
XSD 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
XSD 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.
XSD 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.
XSD 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.
XSD 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
XSD 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.id  ASCII Text = COMPULSORY

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

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
XSD 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.
XSD 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.
XSD type
string

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, '-', '_'
XSD 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
XSD 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
XSD 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
XSD 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
XSD 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
XSD 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
XSD 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
XSD 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.
XSD 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
XSD 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.
XSD 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
XSD 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
XSD 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
XSD 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
XSD 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
XSD 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
XSD 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
XSD 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
XSD 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 MasterCard