Update Session From Wallet
This operation retrieves the payer's payment details associated with a wallet interaction.
For the MasterPass wallet, provide the oauthToken, oauthVerifier and checkoutUrl returned by the MasterPass callback to retrieve the payer's payment details associated with the MasterPass interaction.The payment details collected at MasterPass Online will be stored against the payment session identified in the request.
For the Visa Checkout wallet, provide the callId returned by the Visa Checkout Lightbox to retrieve the payer's payment details associated with the Visa Checkout interaction.
The retrieved payment details are stored against the payment session identified in the request.
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
apiOperation String =UPDATE_SESSION_FROM_WALLET FIXED
Existence
FIXED
Fixed value
UPDATE_SESSION_FROM_WALLET
Validation Rules
Any sequence of zero or more unicode characters.
XSD type
string
order = COMPULSORY
Details of the 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.currency Upper case alphabetic text = OPTIONAL
The currency of the order expressed as an ISO 4217 alpha code, e.g. USD.
This is only required for Express Checkout.
Existence
OPTIONAL
Fixed value
Validation Rules
Data must consist of the characters A-Z
JSON type
String
minimum length
3
maximum length
3
order.walletProvider Enumeration = COMPULSORY
Details about the source of the payment details used for digital payment methods.
Provide this value when you process payments for:
- • Device payment methods such as Apple Pay, Android Pay, Samsung Pay, or Google Pay.
- • Digital wallets such as Masterpass, Visa Checkout or Amex Express Checkout.
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.
apiOperation String =UPDATE_SESSION_FROM_WALLET FIXED
Existence
FIXED
Fixed value
UPDATE_SESSION_FROM_WALLET
Validation Rules
Any sequence of zero or more unicode characters.
XSD type
string
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
Details of the 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.currency Upper case alphabetic text = OPTIONAL
The currency of the order expressed as an ISO 4217 alpha code, e.g. USD.
This is only required for Express Checkout.
Existence
OPTIONAL
Fixed value
Validation Rules
Data must consist of the characters A-Z
JSON type
String
minimum length
3
maximum length
3
order.walletProvider Enumeration = COMPULSORY
Details about the source of the payment details used for digital payment methods.
Provide this value when you process payments for:
- • Device payment methods such as Apple Pay, Android Pay, Samsung Pay, or Google Pay.
- • Digital wallets such as Masterpass, Visa Checkout or Amex Express Checkout.
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.amexExpressCheckout = OPTIONAL
Provide the details for the Amex Express Checkout Wallet.
Fixed value
wallet.amexExpressCheckout.authCode String = OPTIONAL
An Amex Express Checkout authorization code.
You need this to get the customer details from Amex Express Checkout.Get this value from the Amex Express Checkout Success callback, after the Amex Express Checkout interaction is completed.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
100
wallet.amexExpressCheckout.selectedCardType String = OPTIONAL
The type of card the payer selects for the payment.
Get this value from the Amex Express Checkout Success callback, after the Amex Express Checkout interaction is completed..
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
10
wallet.amexExpressCheckout.transactionId String = OPTIONAL
A unique identifier provided for end to end tracking of an Amex Express Checkout interaction.
Get this value from the Amex Express Checkout Success callback, after the Amex Express Checkout interaction is completed.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
36
wallet.amexExpressCheckout.walletId String = OPTIONAL
The identifier of the wallet from which the payer selects their card.
Get this value from the Amex Express Checkout Success callback, after the Amex Express Checkout interaction is completed.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
2
wallet.masterpass = OPTIONAL
Provide the details for the MasterPass Wallet.
Fixed value
wallet.masterpass.checkoutUrl Url = OPTIONAL
The MasterPass URL the gateway will use to retrieve the cardholder's payment details into the session.
Existence
OPTIONAL
Fixed value
Validation Rules
Ensure that this is a valid URL according to RFC 1738.
JSON type
String
wallet.masterpass.oauthToken String = OPTIONAL
Provide the value of the field oauthToken as returned by the MasterPass lightbox.
The gateway will use this, to retrieve the payer's payment details for the respective interaction from MasterPass and store them against the payment session (identified in field session.id). Mandatory for the MASTERPASS_ONLINE Wallet Provider.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
255
wallet.masterpass.oauthVerifier String = OPTIONAL
Provide the value of the field oauthVerifier as returned by the MasterPass lightbox.
The gateway will use this, to retrieve the payer's payment details for the respective interaction from MasterPass and store them against the payment session (identified in field session.id). Mandatory for the MASTERPASS_ONLINE Wallet Provider.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
255
wallet.masterpassExpressCheckout = OPTIONAL
Parameters used to obtain wallet details from MasterPass for an Express Checkout interaction.
The wallet details are added to the session.
Fixed value
wallet.masterpassExpressCheckout.longAccessToken String = OPTIONAL
A wallet token provided by the gateway for Masterpass paired accounts.
Provide this token to obtain pre-checkout data from the payer's wallet for future interactions.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
255
wallet.masterpassExpressCheckout.masterpassCardId String = OPTIONAL
The MasterPass identifier for the card.
Provide this value to MasterPass in the cardId parameter when you initiate a 'Connected Checkout' or 'Express Checkout' MasterPass interaction for this wallet.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
255
wallet.masterpassExpressCheckout.masterpassShippingId String = OPTIONAL
The MasterPass identifier for the shipping address.
Provide this value to MasterPass in the shippingId parameter when you initiate a 'Connected Checkout' or 'Express Checkout' MasterPass interaction for this wallet.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
255
wallet.masterpassExpressCheckout.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.masterpassExpressCheckout.precheckoutTransactionId String = OPTIONAL
A MasterPass transaction identifier.
Provide this value to MasterPass when you initiate a 'Connected Checkout' or 'Express Checkout' MasterPass interaction for this wallet.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
50
wallet.masterpassExpressCheckout.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
wallet.visaCheckout = OPTIONAL
Provide the details for the VisaCheckout Wallet.
Fixed value
wallet.visaCheckout.callId String = OPTIONAL
Provide the value of the field callId as returned by the Visa Checkout lightbox.
The gateway will use this, to retrieve the payer's payment details for the respective interaction from Visa Checkout and store them against the payment session (identified in field session.id). Mandatory for the VISA_CHECKOUT Wallet Provider.
Existence
OPTIONAL
Fixed value
Validation Rules
Data can consist of any characters
JSON type
String
minimum length
1
maximum length
48
{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
Details about the source of the payment details used for digital payment methods.
Provide this value when you process payments for:
- • Device payment methods such as Apple Pay, Android Pay, Samsung Pay, or Google Pay.
- • Digital wallets such as Masterpass, Visa Checkout or Amex Express Checkout.
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
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.