Google Pay Card Response
August 21, 2026 ยท View on GitHub
The payment card to use to fund a Google Pay payment response. Can be a credit or debit card.
Structure
GooglePayCardResponse
Fields
| Name | Type | Tags | Description | Getter | Setter |
|---|---|---|---|---|---|
Name | String | Optional | The card holder's name as it appears on the card. Constraints: Minimum Length: 1, Maximum Length: 300, Pattern: ^.{1,300}$ | String getName() | setName(String name) |
LastDigits | String | Optional, Read-only | The last digits of the payment card. Constraints: Minimum Length: 2, Maximum Length: 4, Pattern: ^[0-9]{2,4}$ | String getLastDigits() | setLastDigits(String lastDigits) |
Type | CardType | Optional | Type of card. i.e Credit, Debit and so on. Constraints: Minimum Length: 1, Maximum Length: 255, Pattern: ^[A-Z_]+$ | CardType getType() | setType(CardType type) |
Brand | CardBrand | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards. Constraints: Minimum Length: 1, Maximum Length: 255, Pattern: ^[A-Z_]+$ | CardBrand getBrand() | setBrand(CardBrand brand) |
BillingAddress | Address | Optional | The portable international postal address. Maps to AddressValidationMetadata and HTML 5.1 Autofilling form controls: the autocomplete attribute. | Address getBillingAddress() | setBillingAddress(Address billingAddress) |
AuthenticationResult | AuthenticationResponse | Optional | Results of Authentication such as 3D Secure. | AuthenticationResponse getAuthenticationResult() | setAuthenticationResult(AuthenticationResponse authenticationResult) |
Example
import com.paypal.sdk.models.Address;
import com.paypal.sdk.models.CardBrand;
import com.paypal.sdk.models.CardType;
import com.paypal.sdk.models.GooglePayCardResponse;
GooglePayCardResponse googlePayCardResponse = new GooglePayCardResponse.Builder()
.name("name2")
.type(CardType.STORE)
.brand(CardBrand.DINERS)
.billingAddress(new Address.Builder(
"country_code8"
)
.addressLine1("address_line_12")
.addressLine2("address_line_28")
.adminArea2("admin_area_28")
.adminArea1("admin_area_14")
.postalCode("postal_code0")
.build())
.build();