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://test-nbkpayment.mtf.gateway.mastercard.com/api/rest/version/81/merchant/{merchantId}/session/{sessionId} |
HTTP Method | POST |
Authentication |
This operation requires authentication via one of the following methods:
|
Request Parameters
order = COMPULSORY
order
Fixed value
order.walletProvider Enumeration = COMPULSORY
Select the wallet provider for this interaction.
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
A transient identifier for the request, that can be used to match the response to the request.
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 total amount for the order. This is the net amount plus any merchant charge amounts.If you provide any sub-total amounts, then the sum of these amounts (order.itemAmount, order.taxAmount, order.shippingAndHandlingAmount, order.cashbackAmount, order.gratuityAmount, order.merchantCharge.amount and order.dutyAmount), minus the order.discountAmount must equal the net amount.
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 amount the payer has chosen to receive as cash in addition to the amount they are paying for the goods or services they are purchasing from you.
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
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
The currency of the order expressed as an ISO 4217 alpha code, e.g. USD.
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
Short textual description of the contents of the order.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
127
order.discount = OPTIONAL
Information about a price reduction you have applied to the order.
For example, you may apply discounts for trade, employees, bulk purchase, or a sales promotion.
Fixed value
order.discount.amount Decimal = OPTIONAL
The total amount of the discount you have applied to the order.
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
The code you use to identify the reason for the discount.
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
A description of your reason for the discount.
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
The duty amount (also known as customs tax, tariff or dues) for the order.
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 amount the payer has chosen to provide as a gratuity or tip in addition to the amount they are paying for the goods or services they are purchasing from you.
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.shippingAndHandlingAmount Decimal = OPTIONAL
The total shipping and handling amount for the order, including taxes on the shipping and/or handling.
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
The tax amount levied on the shipping and handling amount for the order.
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
The tax rate applied to the shipping and handling amount for the order to determine the shipping and handling tax amount.
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
The tax amount included in this order for the tax type.
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
The tax rate (percentage) used to determine the tax amount included in this order for the tax type.
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 type of tax included in the order amount.
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
The total tax amount for the order.
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.
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
Allows you to provide the Address Verification Service (AVS) Response Code Transaction Filtering rules to be applied to the transactions for this order.
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
The action to be performed for the Address Verification Service (AVS) Response Code.
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
The Address Verification Service (AVS) Response Code for which you are defining the rule.
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
Select the wallet provider for this interaction.
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
Use this field to implement optimistic locking of the session content.
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.
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
The URL of the page that will initialize the MasterPass lightbox.
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
The URL of the outer or parent page that will initialize the MasterPass lightbox.
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
The unique identifier issued to you by your payment provider.
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
The identifier of the payment session
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
The unique identifier issued to you by your payment provider.
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
Select the wallet provider for this interaction.
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
A system-generated high level overall result of the operation.
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
session carrying the details to be used by the operation rather than the details being provided in the request.
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
Use this field to implement optimistic locking of the session content.
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.
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
An encrypted JSON representation of payment data.
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
The card types supported for the merchant.
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
The merchant's MasterPass Checkout Identifier required to initiate a MasterPass wallet interaction.
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
The URL of the page that will initialize the MasterPass lightbox.
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
The MasterPass request token required to initiate a MasterPass wallet interaction.
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
The URL of the outer or parent page that will initialize the MasterPass lightbox.
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
Card artwork details as returned by Visa Checkout, including the URL of the card art, and height and width of the card art in pixels, for example {"cardArt":[{"baseImageFileName":"<Image URL>","height":50,"width":77}]}.
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
Card brand returned by Visa Checkout indicating the card brand selected by the payer at Visa Checkout.
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
Broadly categorizes the cause of the error.
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
Textual description of the error based on the cause.
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
Indicates the name of the field that failed validation.
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
Indicates the code that helps the support team to quickly identify the exact cause of the error.
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
Indicates the type of field validation error.
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
A system-generated high level overall result of the operation.
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.