Google Wallet event ticket integration in mobile app

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Google Wallet event ticket integration in mobile app
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    757
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    874
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Google Wallet Integration for Event Tickets in Mobile Apps

Google Wallet lets you add concert, sports, or festival tickets directly to Android Wallet — without opening the app at entry. Users present the QR or barcode directly from the lock screen. Integration requires server-side work: Google Wallet API works with JWTs signed by a service account.

How It Works: EventTicketObject

Google Wallet uses EventTicketClass (template) and EventTicketObject (specific ticket). The class is created once per event, objects are created for each ticket.

Process:

  1. Create EventTicketClass via Google Wallet API (REST) — event description, logo, color scheme
  2. For each ticket, create EventTicketObject with barcode and seat data
  3. Generate JWT with the object, send to the app
  4. App calls the "Add to Google Wallet" button

Server-Side: JWT and Google Wallet API

You need a service account in Google Cloud Console with the Wallet Object Issuer role.

import jwt
from google.oauth2 import service_account
import json

def create_event_ticket_jwt(event_id: str, ticket_id: str, holder_name: str, seat: str) -> str:
    credentials = service_account.Credentials.from_service_account_file(
        'service-account.json',
        scopes=['https://www.googleapis.com/auth/wallet_object.issuer']
    )

    issuer_id = "YOUR_ISSUER_ID"  # from Google Pay & Wallet Console
    class_suffix = f"event_{event_id}"
    object_suffix = f"ticket_{ticket_id}"

    ticket_object = {
        "id": f"{issuer_id}.{object_suffix}",
        "classId": f"{issuer_id}.{class_suffix}",
        "state": "ACTIVE",
        "barcode": {
            "type": "QR_CODE",
            "value": ticket_id,
            "alternateText": ticket_id[:8]
        },
        "ticketHolderName": holder_name,
        "seatInfo": {
            "seat": {"defaultValue": {"language": "en", "value": seat}},
            "row": {"defaultValue": {"language": "en", "value": "A"}},
        },
        "reservationInfo": {
            "confirmationCode": ticket_id[:8].upper()
        },
        "heroImage": {
            "sourceUri": {"uri": "https://yourapp.com/event-banner.jpg"}
        }
    }

    payload = {
        "iss": credentials.service_account_email,
        "aud": "google",
        "typ": "savetowallet",
        "iat": int(time.time()),
        "origins": ["https://yourapp.com"],
        "payload": {
            "eventTicketObjects": [ticket_object]
        }
    }

    token = jwt.encode(payload, credentials._private_key_pkcs8_pem, algorithm="RS256")
    return token

JWT is sent to the mobile app as a string. Lifespan is 1 hour from generation.

Android: "Add to Google Wallet" Button

// build.gradle
implementation("com.google.android.gms:play-services-wallet:19.3.0")

class TicketActivity : AppCompatActivity() {
    private val walletClient by lazy {
        Wallet.getWalletClient(
            this,
            WalletOptions.Builder()
                .setEnvironment(WalletConstants.ENVIRONMENT_PRODUCTION)
                .build()
        )
    }

    private val addToWalletLauncher = registerForActivityResult(
        ActivityResultContracts.StartIntentSenderForResult()
    ) { result ->
        when (result.resultCode) {
            RESULT_OK -> showSuccess()
            RESULT_CANCELED -> { /* user cancelled */ }
            else -> showError()
        }
    }

    fun addTicketToWallet(jwt: String) {
        val request = SavePassesRequest.newBuilder()
            .setJwt(jwt)
            .build()

        walletClient.savePassesViaIntent(request) { apiResult ->
            apiResult.intentSender?.let { intentSender ->
                addToWalletLauncher.launch(
                    IntentSenderRequest.Builder(intentSender).build()
                )
            }
        }
    }
}

Button According to Google Guidelines

Google strictly regulates button appearance. You cannot use arbitrary text or color. The correct way is to use the official vector or ready-made component:

<com.google.android.gms.wallet.button.PayButton
    android:id="@+id/addToWalletButton"
    android:layout_width="match_parent"
    android:layout_height="48dp"
    app:allowedAuthMethods="PAN_ONLY|CRYPTOGRAM_3DS"
    app:buttonType="addToGoogleWallet" />

Checking Wallet Availability

Before showing the button, check if Google Wallet is available on the device:

walletClient.getPayApiAvailabilityStatus(
    PayApiAvailabilityStatusRequest.newBuilder()
        .setRequestType(PayApiAvailabilityStatusRequest.RequestType.SAVE_PASSES)
        .build()
).addOnSuccessListener { status ->
    if (status.isAvailable) {
        addToWalletButton.isVisible = true
    }
}

Wallet is unavailable on devices without Google Play Services and in some regions.

Updating Ticket After Issuance

If you need to update the QR code or ticket status (e.g., "used") — call a PATCH request to Google Wallet API with objectId. Changes apply to already-added passes in real time.

from googleapiclient.discovery import build

service = build('walletobjects', 'v1', credentials=credentials)
service.eventticketobject().patch(
    resourceId=f"{issuer_id}.{object_suffix}",
    body={"state": "COMPLETED"}  # ticket used
).execute()

Timeline

2–3 days. Create event class, generate JWT, integrate button — 1.5 days. Update status via API + testing — 0.5–1 day. Pricing is calculated individually.