Masterpass
Server-Side Implementation
Availability
Masterpass has been replaced with the latest unified checkout experience offered through Visa known as Secure Remote Commerce (SRC). If you were previously using Masterpass, you will need to integrate with SRC
SRC is currently in a limited release to eligible merchants, and the API is subject to change. It was introduced in Android v2, iOS v4, and JavaScript v3 of our Client SDKs.
Contact us to request access to the release.
Creating transactions
Creating a Masterpass transaction is the same as creating any other transaction with a nonce.
Collect device data
from the client and include the DeviceDataFromTheClient in the
transaction.
- C#
var request = new TransactionRequest {
Amount = 10.00M,
PaymentMethodNonce = nonceFromTheClient,
DeviceData = deviceDataFromTheClient,
Options = new TransactionOptionsRequest {
SubmitForSettlement = true
}
};
Result<transaction> result = gateway.Transaction.Sale(request);
if (result.IsSuccess()) {
// See result.Target for details
} else {
// Handle errors
}
Vaulting Masterpass
Important
Vaulting can only be used to support recurring transactions. You will need to obtain approval from
Masterpass in order to do so.
- C#
var request = new PaymentMethodRequest {
CustomerId = "131866",
PaymentMethodNonce = NonceFromTheClient
};
Result<paymentmethod> result = gateway.PaymentMethod.Create(request);
Transaction: Sale
with
Options.StoreInVault
or
Options.StoreInVaultOnSuccess
. You can create a recurring transaction by using
Transaction: Sale
with
Recurring
. It is important to note that Masterpass does not support split shipments or one-off transactions
with vaulted payment information. If you attempt to create a non-recurring transaction from a
vaulted Masterpass card, you'll receive a
validation error:
"Vaulted cards from this payment method can only be used for recurring transactions."