Summary: Methods | Inherited Methods | [Expand All]
public final class

# PaymentMethodTokenizationParameters.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.wallet.PaymentMethodTokenizationParameters.Builder

## Class Overview

Builder to create a `PaymentMethodTokenizationParameters`.

## Summary

Public Methods
PaymentMethodTokenizationParameters.Builder | addParameter(String name, String value) Adds tokenization specific parameters.
PaymentMethodTokenizationParameters | build()
PaymentMethodTokenizationParameters.Builder | setPaymentMethodTokenizationType(int tokenizationType) Sets payment method tokenization type.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Public Methods

#### public PaymentMethodTokenizationParameters.Builder addParameter (String name, String value)

Adds tokenization specific parameters.

This method is useful when in addition to tokenization type integrator needs to use custom options.

For example when integrator wants to use Stripe for tokenization the following parameters should be used:

    Gateway name (lowercase):
        name: "gateway"
        value: "stripe"

     Stripe publishable key:
        name: "stripe:publishableKey"
        value: "pk_..."

     Stripe SDK version:
        name: "stripe:version"
        value: "version of Stripe SDK used by the integrator's app"

     Sample configuration:
     PaymentMethodTokenizationParameters parameters =
         PaymentMethodTokenizationParameters.newBuilder()
             .setPaymentMethodTokenizationType(
                     PaymentMethodTokenizationType.PAYMENT_GATEWAY)
             .addParameter("gateway", "stripe")
             .addParameter("stripe:publishableKey", "pk_1234")
             .addParameter("stripe:version", "1.5")
         .buid();

##### Parameters

name | the name of the parameter
value | the value of the parameter

##### Throws

| IllegalArgumentException} when either name or value is empty

#### public PaymentMethodTokenizationParameters build ()

#### public PaymentMethodTokenizationParameters.Builder setPaymentMethodTokenizationType (int tokenizationType)

Sets payment method tokenization type. See `PaymentMethodTokenizationType` for suported tokenization types.