Expired Boarding passes  |  Google for Developers (2024)

Table of Contents
Java PHP Python C# Node.js Go FAQs

In Google Wallet, there's an "Expired passes" section that contains all archived or inactive passes.

A pass is moved to the "Expired passes" section if at least one of the following conditions is true:

The following code sample demonstrates expiring a pass object using the GoogleWallet API.

Java

To start your integration in Java, refer to our complete code samples on Github.

/** * Expire an object. * * <p>Sets the object's state to Expired. If the valid time interval is already set, the pass will * expire automatically up to 24 hours after. * * @param issuerId The issuer ID being used for this request. * @param objectSuffix Developer-defined unique ID for this pass object. * @return The pass object ID: "{issuerId}.{objectSuffix}" */public String expireObject(String issuerId, String objectSuffix) throws IOException { // Check if the object exists try { service.flightobject().get(String.format("%s.%s", issuerId, objectSuffix)).execute(); } catch (GoogleJsonResponseException ex) { if (ex.getStatusCode() == 404) { // Object does not exist System.out.printf("Object %s.%s not found!%n", issuerId, objectSuffix); return String.format("%s.%s", issuerId, objectSuffix); } else { // Something else went wrong... ex.printStackTrace(); return String.format("%s.%s", issuerId, objectSuffix); } } // Patch the object, setting the pass as expired FlightObject patchBody = new FlightObject().setState("EXPIRED"); FlightObject response = service .flightobject() .patch(String.format("%s.%s", issuerId, objectSuffix), patchBody) .execute(); System.out.println("Object expiration response"); System.out.println(response.toPrettyString()); return response.getId();}

PHP

To start your integration in PHP, refer to our complete code samples on Github.

/** * Expire an object. * * Sets the object's state to Expired. If the valid time interval is * already set, the pass will expire automatically up to 24 hours after. * * @param string $issuerId The issuer ID being used for this request. * @param string $objectSuffix Developer-defined unique ID for this pass object. * * @return string The pass object ID: "{$issuerId}.{$objectSuffix}" */public function expireObject(string $issuerId, string $objectSuffix){ // Check if the object exists try { $this->service->flightobject->get("{$issuerId}.{$objectSuffix}"); } catch (Google\Service\Exception $ex) { if (!empty($ex->getErrors()) && $ex->getErrors()[0]['reason'] == 'resourceNotFound') { print("Object {$issuerId}.{$objectSuffix} not found!"); return "{$issuerId}.{$objectSuffix}"; } else { // Something else went wrong... print_r($ex); return "{$issuerId}.{$objectSuffix}"; } } // Patch the object, setting the pass as expired $patchBody = new Google_Service_Walletobjects_FlightObject([ 'state' => 'EXPIRED' ]); $response = $this->service->flightobject->patch("{$issuerId}.{$objectSuffix}", $patchBody); print "Object expiration response\n"; print_r($response); return $response->id;}

Python

To start your integration in Python, refer to our complete code samples on Github.

def expire_object(self, issuer_id: str, object_suffix: str) -> str: """Expire an object. Sets the object's state to Expired. If the valid time interval is already set, the pass will expire automatically up to 24 hours after. Args: issuer_id (str): The issuer ID being used for this request. object_suffix (str): Developer-defined unique ID for the pass object. Returns: The pass object ID: f"{issuer_id}.{object_suffix}" """ # Check if the object exists response = self.http_client.get( url=f'{self.object_url}/{issuer_id}.{object_suffix}') if response.status_code == 404: print(f'Object {issuer_id}.{object_suffix} not found!') return f'{issuer_id}.{object_suffix}' elif response.status_code != 200: # Something else went wrong... print(response.text) return f'{issuer_id}.{object_suffix}' # Patch the object, setting the pass as expired patch_body = {'state': 'EXPIRED'} response = self.http_client.patch( url=f'{self.object_url}/{issuer_id}.{object_suffix}', json=patch_body) print('Object expiration response') print(response.text) return response.json().get('id')

C#

To start your integration in C#, refer to our complete code samples on Github.

/// <summary>/// Expire an object./// <para />/// Sets the object's state to Expired. If the valid time interval is already/// set, the pass will expire automatically up to 24 hours after./// </summary>/// <param name="issuerId">The issuer ID being used for this request.</param>/// <param name="objectSuffix">Developer-defined unique ID for this pass object.</param>/// <returns>The pass object ID: "{issuerId}.{objectSuffix}"</returns>public string ExpireObject(string issuerId, string objectSuffix){ // Check if the object exists Stream responseStream = service.Flightobject .Get($"{issuerId}.{objectSuffix}") .ExecuteAsStream(); StreamReader responseReader = new StreamReader(responseStream); JObject jsonResponse = JObject.Parse(responseReader.ReadToEnd()); if (jsonResponse.ContainsKey("error")) { if (jsonResponse["error"].Value<int>("code") == 404) { // Object does not exist Console.WriteLine($"Object {issuerId}.{objectSuffix} not found!"); return $"{issuerId}.{objectSuffix}"; } else { // Something else went wrong... Console.WriteLine(jsonResponse.ToString()); return $"{issuerId}.{objectSuffix}"; } } // Patch the object, setting the pass as expired FlightObject patchBody = new FlightObject { State = "EXPIRED" }; responseStream = service.Flightobject .Patch(patchBody, $"{issuerId}.{objectSuffix}") .ExecuteAsStream(); responseReader = new StreamReader(responseStream); jsonResponse = JObject.Parse(responseReader.ReadToEnd()); Console.WriteLine("Object expiration response"); Console.WriteLine(jsonResponse.ToString()); return $"{issuerId}.{objectSuffix}";}

Node.js

To start your integration in Node, refer to our complete code samples on Github.

/** * Expire an object. * * Sets the object's state to Expired. If the valid time interval is * already set, the pass will expire automatically up to 24 hours after. * * @param {string} issuerId The issuer ID being used for this request. * @param {string} objectSuffix Developer-defined unique ID for the pass object. * * @returns {string} The pass object ID: `${issuerId}.${objectSuffix}` */async expireObject(issuerId, objectSuffix) { let response; // Check if the object exists try { response = await this.httpClient.request({ url: `${this.objectUrl}/${issuerId}.${objectSuffix}`, method: 'GET' }); } catch (err) { if (err.response && err.response.status === 404) { console.log(`Object ${issuerId}.${objectSuffix} not found!`); return `${issuerId}.${objectSuffix}`; } else { // Something else went wrong... console.log(err); return `${issuerId}.${objectSuffix}`; } } // Patch the object, setting the pass as expired let patchBody = { 'state': 'EXPIRED' }; response = await this.httpClient.request({ url: `${this.objectUrl}/${issuerId}.${objectSuffix}`, method: 'PATCH', data: patchBody }); console.log('Object expiration response'); console.log(response); return `${issuerId}.${objectSuffix}`;}

Go

To start your integration in Go, refer to our complete code samples on github code samples on Github.

// Expire an object.//// Sets the object's state to Expired. If the valid time interval is// already set, the pass will expire automatically up to 24 hours after.func (d *demoFlight) expireObject(issuerId, objectSuffix string) {patchBody := `{"state": "EXPIRED"}`url := fmt.Sprintf("%s/%s.%s", objectUrl, issuerId, objectSuffix)req, _ := http.NewRequest(http.MethodPatch, url, bytes.NewBuffer([]byte(patchBody)))res, err := d.httpClient.Do(req)if err != nil {fmt.Println(err)} else {b, _ := io.ReadAll(res.Body)fmt.Printf("Object expiration response:\n%s\n", b)}}
Expired Boarding passes  |  Google for Developers (2024)

FAQs

What do expired passes mean on Google Pay? ›

In Google Wallet, there's an "Expired passes" section that contains all archived or inactive passes. A pass is moved to the "Expired passes" section if at least one of the following conditions is true: It's been at least 24 hours since class. localScheduledDepartureDateTime or class.

How do I remove expired boarding passes from my wallet? ›

In the Wallet app on your iPhone, scroll to the bottom and tap View Expired Passes. Tap a pass to view its details. Tap Unhide to return the pass to the main view of the Wallet app or tap Delete to remove it.

Do boarding passes update? ›

Yes, your mobile boarding pass will update if there are changes made to your flight.

What is an expired pass? ›

Jan 16, 2024. 1/16/2024, 1:39:30 PM. An expired pass is a ticket that you got from a ticket vendor and is past the expiry date, for example several days after the event date has passed. The ticket vendor manages your pass and when it expires.

What does pass expiry mean? ›

the date at which a document, agreement, etc. has no legal force or can no longer be used: You need to enter the credit card number and expiry date. Their concession to operate the franchise currently has an expiry date of 2052. pass/reach its expiry date The car's tax disc had passed its expiry date.

Can I throw away old boarding passes? ›

Like any other sensitive document, a boarding pass must be disposed of with caution. Rather than tossing it in the nearest garbage can after landing, hold on to it until you can ensure it cannot be used by someone nefarious.

Can old boarding pass be retrieved? ›

Airlines typically retain boarding pass information for a limited time. If you need a boarding pass for a past flight, you can try contacting the airline directly to request a copy. They may be able to provide you with a travel certificate or other documentation that can serve as proof of travel.

Can a boarding pass be reissued? ›

Please reissue your boarding pass at the online check-in site or bring your e-ticket to the check-in counter on the departure day.

How do I delete my boarding pass from Google Wallet? ›

How to remove your boarding pass from Google Wallet
  1. Open Google Wallet.
  2. Tap your boarding pass.
  3. Scroll down and tap Remove.
  4. Confirm by tapping Remove from the pop-up window.
Apr 11, 2024

How to find expired passes? ›

  1. Open your Google Pay app.
  2. Tap on the "Expired Passes" text.
  3. Supporters need to unhide their NFC pass if it has dropped into their expired passes, or it won't reappear in your wallet.
  4. Now go back to the main Google Pay screen.
  5. Your pass should reappear.
Feb 22, 2024

How do I clear my Google Wallet? ›

  1. Open the Settings app.
  2. Tap Apps Google Wallet. If you can't find “Google Wallet,” tap See all apps Google Wallet.
  3. Tap Storage & cache Clear storage Clear cache.

Why do people still print boarding passes? ›

The Boarding Pass – Airlines Recommend

The airlines will especially recommend printing a boarding pass if you're taking connecting flights, as the longer you're in transit, the more likely your phone battery will run low or die completely.

Do I need to print a boarding pass if I have it on my phone? ›

Generally speaking, we like to err on the side of caution and suggest you print out your boarding pass, even if you already checked in online and have a mobile version on your phone.

How do I update my Google wallet pass? ›

Update a Passes Class
  1. Navigate to the console.
  2. Select Google Wallet API.
  3. Select the class you want to modify.
  4. Select Edit.
  5. Update the class properties.
  6. Select Save.

What happens when Google Play pass expires? ›

After your subscription ends, you'll lose access to the Play Pass tab on the Google Play Store app. Games and apps you get from the Play Pass catalog may start to show ads and in-app purchases.

What does it mean when Google Pay expires? ›

On the expiry date of your card, it will become inactive on Google Pay. You will need to add your replacement card to Google Pay.

What does payment status expired mean? ›

Payment wasn't captured before the date that was set by the payment provider on an order that had the Authorized payment status. Some payment providers that provide alternatives to credit card and cash payments, use the Expired status to indicate that they were unable to process the payment.

What is a pass in Google Pay? ›

A pass is an instance of a Passes Object that is issued to a user to save in their Google Wallet. The Google Wallet API provides support for a number of common pass types, including boarding passes, event tickets, ID cards, and more.

Top Articles
A Brief History of Gold | The Royal Mint
Bookkeeping With Excel: 6 Steps, Pros, Cons & Example
Jennette Mccurdy And Joe Tmz Photos
Craigslist - Pets for Sale or Adoption in Zeeland, MI
Back to basics: Understanding the carburetor and fixing it yourself - Hagerty Media
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Nexus Crossword Puzzle Solver
Ap Chem Unit 8 Progress Check Mcq
The fabulous trio of the Miller sisters
Jvid Rina Sauce
Money blog: Domino's withdraws popular dips; 'we got our dream £30k kitchen for £1,000'
London Ups Store
Abortion Bans Have Delayed Emergency Medical Care. In Georgia, Experts Say This Mother’s Death Was Preventable.
Convert 2024.33 Usd
Video shows two planes collide while taxiing at airport | CNN
Invert Clipping Mask Illustrator
We Discovered the Best Snow Cone Makers for Carnival-Worthy Desserts
Team C Lakewood
Knock At The Cabin Showtimes Near Alamo Drafthouse Raleigh
SN100C, An Australia Trademark of Nihon Superior Co., Ltd.. Application Number: 2480607 :: Trademark Elite Trademarks
27 Modern Dining Room Ideas You'll Want to Try ASAP
Villano Antillano Desnuda
Jurassic World Exhibition Discount Code
Section 408 Allegiant Stadium
The Clapping Song Lyrics by Belle Stars
Noaa Marine Forecast Florida By Zone
Rock Salt Font Free by Sideshow » Font Squirrel
Pch Sunken Treasures
Baldur's Gate 3 Dislocated Shoulder
Www Craigslist Com Shreveport Louisiana
Panchitos Harlingen Tx
Spinning Gold Showtimes Near Emagine Birch Run
PA lawmakers push to restore Medicaid dental benefits for adults
Ewwwww Gif
Reborn Rich Ep 12 Eng Sub
Planet Fitness Lebanon Nh
Frcp 47
Hellgirl000
Craigslist Lakeside Az
SF bay area cars & trucks "chevrolet 50" - craigslist
Download Diablo 2 From Blizzard
Carroll White Remc Outage Map
Gotrax Scooter Error Code E2
Nu Carnival Scenes
Centimeters to Feet conversion: cm to ft calculator
A Man Called Otto Showtimes Near Cinemark Greeley Mall
Colin Donnell Lpsg
Anonib New
Loss Payee And Lienholder Addresses And Contact Information Updated Daily Free List Bank Of America
Wayward Carbuncle Location
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 6168

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.