Open Wallet

Request to initiate a wallet interaction. You must use the URL provided in the response to redirect the payer's browser to the wallet provider's website.

The interaction details (including the return, redirect and cancel URLs) and the payment details collected at the wallet provider, following a successful interaction, will be stored against the payment session identified in the request.

URL https://ap-gateway.mastercard.com/api/rest/version/19/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.amount  Decimal = COMPULSORY

The amount must be expressed as a decimal number in the units of the currency. For example 12.34 in USD is the amount 12 dollars and 34 cents.
Existence
COMPULSORY
Fixed value
Validation Rules
Data is a decimal number.
JSON type
Number
maximum value
2140000000
minimum value
0.001
maximum post-decimal digits
3

order.currency  Upper case alphabetic text = COMPULSORY

The currency must be expressed as an ISO 4217 alpha code.
Existence
COMPULSORY
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

Existence
COMPULSORY
Fixed value
Validation Rules
JSON type
String
Value must be a member of the following list. The values are case sensitive.
MASTERPASS_ONLINE
MasterPass Online wallet provider.

wallet.cancelURL  Url = COMPULSORY

Existence
COMPULSORY
Fixed value
Validation Rules
Ensure that the URL begins with 'https' and is longer than 11 characters.
JSON type
String

wallet.returnURL  Url = COMPULSORY

To check the success or otherwise of the interaction use the Retrieve Session operation.
Existence
COMPULSORY
Fixed value
Validation Rules
Ensure that the URL begins with 'https' and is longer than 11 characters.
JSON 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

order   = COMPULSORY

order
Fixed value

order.amount  Decimal = COMPULSORY

The amount must be expressed as a decimal number in the units of the currency. For example 12.34 in USD is the amount 12 dollars and 34 cents.
Existence
COMPULSORY
Fixed value
Validation Rules
Data is a decimal number.
JSON type
Number
maximum value
2140000000
minimum value
0.001
maximum post-decimal digits
3

order.currency  Upper case alphabetic text = COMPULSORY

The currency must be expressed as an ISO 4217 alpha code.
Existence
COMPULSORY
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

Existence
COMPULSORY
Fixed value
Validation Rules
JSON type
String
Value must be a member of the following list. The values are case sensitive.
MASTERPASS_ONLINE
MasterPass Online wallet provider.

wallet.cancelURL  Url = COMPULSORY

Existence
COMPULSORY
Fixed value
Validation Rules
Ensure that the URL begins with 'https' and is longer than 11 characters.
JSON type
String

wallet.returnURL  Url = COMPULSORY

To check the success or otherwise of the interaction use the Retrieve Session operation.
Existence
COMPULSORY
Fixed value
Validation Rules
Ensure that the URL begins with 'https' and is longer than 11 characters.
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.amount  Decimal = Always Provided

The amount must be expressed as a decimal number in the units of the currency. For example 12.34 in USD is the amount 12 dollars and 34 cents.
Existence
Always Provided
Fixed value
Validation Rules
Data is a decimal number.
JSON type
Number
maximum value
2140000000
minimum value
0.001
maximum post-decimal digits
3

order.currency  Upper case alphabetic text = Always Provided

The currency must be expressed as an ISO 4217 alpha code.
Existence
Always Provided
Fixed value
Validation Rules
Data must consist of the characters A-Z
JSON type
String
minimum length
3
maximum length
3

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.
MASTERPASS_ONLINE
MasterPass Online 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

wallet.redirectURL  Url = Always Provided

Existence
Always Provided
Fixed value
Validation Rules
Ensure that the URL begins with 'https' and is longer than 11 characters.
JSON type
String

wallet.returnURL  Url = Always Provided

Existence
Always Provided
Fixed value
Validation Rules
Ensure that the URL begins with 'https' and is longer than 11 characters.
JSON type
String

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.
CONSTRAINT_VIOLATION
The request was rejected due to the request parameters violating the constraints.
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, SERVER_BUSY or CONSTRAINT_VIOLATION.
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; or if the cause is CONSTRAINT_VIOLATION and a field level constraint was violated.
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 MasterCard