# Compliance

Learn about Google Pay's implementation requirements and suggested best practices for Android applications.

## Overview

The Google Pay component for Android follows Google's official guidelines for Android implementation. This page outlines the key requirements for compliance with Google Pay's brand guidelines and API specifications.

For complete Google Pay compliance requirements, refer to the Google Pay Brand Guidelines and Google Pay API Documentation.

## Technical requirements

### Android platform

- **Minimum API level**: Android 7.0 (API level 24).
- **Google Play Services**: Version 21.0.0+ must be installed and up-to-date.
- **Device requirements**: User must have an active Google account with at least one valid payment method configured in Google Pay.


### Application configuration

- **Permissions**: Required permissions declared in `AndroidManifest.xml` (INTERNET, ACCESS_NETWORK_STATE).
- **ProGuard rules**: Correct ProGuard/R8 rules to prevent obfuscation issues with Google Pay classes.
- **Google Pay meta-data**: `com.google.android.gms.wallet.api.enabled` meta-data in manifest.


### Google Pay registration

- **Package name**: App package name must be registered in the Unity Portal (case-sensitive).
- **Certificate fingerprint**: SHA-256 certificate fingerprints for debug and release keystores must be registered.
- **Gateway integration**: Properly configured payment gateway integration in the Unity Portal.


## Button branding requirements

| Requirement | Description | Status |
|  --- | --- | --- |
| **Equal prominence** | Google Pay button presented with equal prominence to other payment methods. |  |
| **Approved styles** | Only uses Google-approved button types and themes. |  |
| **Minimum height** | Button height is at least 48dp (Android touch target minimum). |  |
| **Maximum height** | Button height does not exceed 72dp. |  |
| **Logo integrity** | Google Pay logo is not distorted or modified. |  |
| **Proper spacing** | Adequate spacing around button (minimum 8dp on all sides). |  |
| **Responsive design** | Button scales appropriately on all screen sizes and densities. |  |
| **Accessibility** | Button is accessible via TalkBack and keyboard navigation. |  |


### Button text and capitalisation

- **Correct usage**: "Google Pay" (capital G, capital P, space between words).
- **Incorrect usage**: "GooglePay", "Google pay", "google pay", "Gpay", or "G Pay".


## Security and data handling

### Security requirements

- Never store sensitive payment information or raw card numbers.
- Encrypt payment tokens using Android Keystore.
- Implement certificate pinning for network security.
- Never log sensitive payment data (card numbers, CVV, tokens).
- Follow secure coding practices for payment processing.


### Data handling requirements

- Only collect necessary payment data (data minimisation).
- Comply with applicable privacy regulations (GDPR, CCPA, etc.).
- Maintain proper audit logging for security and debugging.
- Provide clear privacy policy covering payment data usage.


## Pre-launch checklist

Before going live with Google Pay on Android, ensure your implementation meets these requirements:

### Technical setup

- App supports Android 7.0 (API 24) or higher
- Google Play Services properly configured and version checked at runtime
- App package name registered in the Unity Portal
- SHA-256 fingerprints for debug and release keystores registered
- Gateway merchant ID properly configured in the Unity Portal
- ProGuard/R8 rules added to prevent obfuscation issues
- Required permissions declared in AndroidManifest.xml
- Comprehensive error handling for all payment scenarios


### Button and branding

- Uses Google-approved button styles and themes
- Button height between 48dp and 72dp
- Google Pay button has equal prominence with other payment methods
- Logo used correctly without modification
- Proper spacing (minimum 8dp on all sides)
- Correct capitalisation: "Google Pay" everywhere
- Button scales properly on all screen sizes (phones, tablets)
- Button renders correctly on all screen densities (mdpi to xxxhdpi)


### Security

- Application never stores raw card numbers or CVV
- Payment tokens encrypted using Android Keystore
- Certificate pinning configured for production
- Logs never contain sensitive payment data
- Privacy policy covers payment data usage
- All sensitive data encrypted at rest and in transit


### User experience

- Works on all screen sizes (phones, foldables, tablets)
- Functions correctly in portrait and landscape
- Button theme adapts to system dark mode setting
- Clear error messages with actionable guidance
- Graceful handling when Google Pay is unavailable
- Loading indicators during payment processing
- TalkBack support with proper content descriptions
- Keyboard navigation accessible (tablets, Chrome OS)
- All buttons meet 48dp minimum touch target size


### Testing

- Tested on multiple physical Android devices
- Tested on Android emulators with Google Play Services
- Tested on Android 7.0 (API 24) through latest version
- Tested on phones, tablets, and foldables
- All payment scenarios tested (success, decline, error)
- 3DS authentication flows tested
- Tested with poor network connectivity
- Accessibility tested with TalkBack screen reader


### Compliance

- Google Pay API Terms of Service accepted
- Implementation follows Google Pay Brand Guidelines
- Compliant with PCI DSS requirements
- Compliant with GDPR, CCPA, and local privacy regulations
- Google Pay mentioned correctly in Play Store listing


## Best practices

### Implementation recommendations

- Check Google Play Services availability before showing Google Pay button.
- Provide fallback payment methods when Google Pay is unavailable.
- Test thoroughly after Android OS and Google Play Services updates.
- Monitor Google Pay API changelog for changes.
- Keep SDK and dependencies up to date.


### Monitoring and maintenance

- Track payment success and failure rates.
- Monitor Google Pay availability across devices.
- Set up alerts for unusual activity or high failure rates.
- Regularly review compliance with Google's guidelines.
- Update error handling as needed.


## Additional resources

For detailed compliance information, refer to Google's official documentation:

- Google Pay Brand Guidelines for Android
- Google Pay API Documentation
- Google Pay Business Console
- Android Security Best Practices
- PCI DSS Compliance


Failure to comply with Google Pay's guidelines may result in integration rejection or removal of Google Pay functionality. Regularly review Google's official documentation to ensure your implementation remains compliant.