CardRequirements.Builder

public final class CardRequirements.Builder extends Object

Builder to create a CardRequirements.

Public Method Summary

CardRequirements.Builder
addAllowedCardNetwork(int allowedCardNetwork)
Adds a card network supported for this purchase.
CardRequirements.Builder
addAllowedCardNetworks(Collection<Integer> allowedCardNetworks)
Adds a set of card networks supported for this purchase.
CardRequirements
build()
Returns the actual CardRequirements created using the data passed to the Builder object.
CardRequirements.Builder
setAllowPrepaidCards(boolean allowPrepaidCards)
Sets whether a prepaid card may be used for this transaction.
CardRequirements.Builder
setBillingAddressFormat(int billingAddressFormat)
Sets billing address format.
CardRequirements.Builder
setBillingAddressRequired(boolean billingAddressRequired)
Sets whether a billing address is required from the buyer.

Inherited Method Summary

Public Methods

public CardRequirements.Builder addAllowedCardNetwork (int allowedCardNetwork)

Adds a card network supported for this purchase. See WalletConstants.CardNetwork for available options.

Allowed card networks must be explicitly set using either this method or addAllowedCardNetworks(Collection).

public CardRequirements.Builder addAllowedCardNetworks (Collection<Integer> allowedCardNetworks)

Adds a set of card networks supported for this purchase. See WalletConstants.CardNetwork for available options.

Allowed card networks must be explicitly set using either this method or addAllowedCardNetwork(int).

public CardRequirements build ()

Returns the actual CardRequirements created using the data passed to the Builder object.

public CardRequirements.Builder setAllowPrepaidCards (boolean allowPrepaidCards)

Sets whether a prepaid card may be used for this transaction. If omitted, defaults to true.

public CardRequirements.Builder setBillingAddressFormat (int billingAddressFormat)

Sets billing address format. See WalletConstants.BillingAddressFormat for more info. If omitted, defaults to WalletConstants.BILLING_ADDRESS_FORMAT_MIN.

Only set the format to WalletConstants.BILLING_ADDRESS_FORMAT_FULL when it's required to process the order since this setting can increase friction during the checkout process and can lower your conversion rate.

public CardRequirements.Builder setBillingAddressRequired (boolean billingAddressRequired)

Sets whether a billing address is required from the buyer. The returned billing address can be retrieved by CardInfo.getBillingAddress() in PaymentData.getCardInfo(). If omitted, defaults to false.

Optionally, when a billing address is required, extra format requirements can be set through setBillingAddressFormat(int).