availability

Masterpass is currently in a limited release to eligible merchants and the API is subject to change. Masterpass is only available for JS v3.

Contact us at masterpass-requests@braintreepayments.com to request access to the release.

Creating transactions

Creating a Masterpass transaction is the same as creating any other transaction with a nonce:

Ruby
Click to copy
Copied
result = Braintree::Transaction.sale(
  :amount => "10.00",
  :payment_method_nonce => nonce_from_the_client,
  :options => {
    :submit_for_settlement => true
  }
)

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. Contact us at masterpass-requests@braintreepayments.com to start the approval process.

Once you have been approved for recurring transactions, your customer's Masterpass card selection can be saved to your Vault and used for recurring transactions. If you attempt to vault a Masterpass card without first going through the approval process, you will get a validation error: "Nonce is not vaultable."

Ruby
Click to copy
Copied
result = Braintree::PaymentMethod.create(
  :customer_id => "131866",
  :payment_method_nonce => nonce_from_the_client
)

You can also save the customer's Masterpass card to your Vault at the same time as your transaction by using Braintree::Transaction.sale() with options.store_in_vault or options.store_in_vault_on_success. You can create a recurring transaction by using Braintree::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."

Card verification

Card verification in the gateway is not supported with Masterpass. Masterpass automatically verifies a card when the customer adds it to their wallet.

Next: Testing and Go Live →

Still have questions?

If you can’t find an answer, contact our Support team.