Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Setelah membuat kartu dan mengenkodenya dalam JWT yang ditandatangani, Anda siap untuk menerbitkannya di mana saja tempat 'Tambahkan ke Google Wallet' link didukung. Untuk melakukannya, Anda akan memberikan 'Tambahkan ke Google Wallet' kepada pengguna Anda atau hyperlink, yang akan menyimpan kartu ke Google Wallet setelah mereka mengetuknya. Beberapa contoh penggunaan metode ini meliputi situs, email, SMS, dan lainnya.
Prasyarat
Sebelum mencoba memberikan kartu, pastikan Anda melakukan hal berikut:
Mengenkode Class Kartu dan Meneruskan Objek di JWT.
Tanda tangani JWT Anda dengan kunci akun layanan Google Cloud.
1. Buat 'Tambahkan ke Google Wallet' tautan
Menerbitkan kartu dengan 'Google Wallet' menambahkan Objek Kartu ke Google Wallet pengguna, dan hanya dapat dimulai dalam konteks identitas Google yang digunakan untuk login.
Untuk informasi selengkapnya terkait cara membuat JWT yang ditandatangani, diperlukan pembuatan 'Tambahkan ke Google Wallet' lihat Bekerja dengan Token Web JSON.
2. (Disarankan) Gunakan 'Tambahkan ke Google Wallet' tombol
Untuk semua platform yang mendukung gambar hyperlink, seperti situs dan email, sebaiknya berikan kolom 'Tambahkan ke Google Wallet' tautkan ke pengguna Anda dengan 'Tambahkan ke Google Wallet' tombol. Bagi pengguna Google Wallet, tombol ini adalah perintah umum yang dapat dikenali sebagai cara untuk mulai menambahkan kartu ke Google Wallet mereka.
Aset gambar tersedia untuk didownload dalam berbagai orientasi dan bahasa untuk mendukung integrasi Google Wallet API.
[null,null,["Terakhir diperbarui pada 2025-08-29 UTC."],[[["\u003cp\u003eEasily issue passes to users through an 'Add to Google Wallet' link, which can be embedded in websites, emails, SMS, and more.\u003c/p\u003e\n"],["\u003cp\u003eThe 'Add to Google Wallet' link is a dynamically generated URL containing an encoded and signed JWT.\u003c/p\u003e\n"],["\u003cp\u003eIt's recommended to use the 'Add to Google Wallet' button to visually prompt users to save the pass to their Google Wallet.\u003c/p\u003e\n"],["\u003cp\u003eEnsure you've completed the onboarding process, created necessary classes and objects, encoded them in a JWT, and signed it before issuing passes.\u003c/p\u003e\n"],["\u003cp\u003eDemo passes will include "[TEST ONLY]" in the title until you receive publishing access.\u003c/p\u003e\n"]]],["To issue a pass, encode it in a signed JWT and present it via an 'Add to Google Wallet' link or button on websites, email, or SMS. This link, containing the signed JWT, directs users to save the pass to their Google Wallet. Ensure prerequisites are met: onboarding, Pass Classes/Objects creation, JWT encoding and signing. Demo passes have a \"[TEST ONLY]\" label, which disappears upon gaining publishing access. The JWT should be under 1800 characters to avoid browser truncation.\n"],null,["# Issuing passes for web, email, SMS\n\nOnce you've created a pass and encoded it in a signed JWT, you are ready to issue it anywhere that the 'Add to Google Wallet' link is supported. To do this, you will present your user with an 'Add to Google Wallet' button or a hyperlink, which will save the pass to their Google Wallet once they tap it. Examples of where you might use this method include websites, email, SMS, and more.\n| **Demo Mode / \\[TEST ONLY\\] passes**\n|\n| When you are still in [Demo Mode](../resources/terminology#demo-mode), all the passes that you create will have an additional text \"\\[TEST ONLY\\]\" in the title. This is to differentiate demo passes from live passes. Once you are granted [publishing access](../test-and-go-live/request-publishing-access), these demo mode passes will no longer have the additional text when the user reopens the wallet app on a connected device.\n\nPrerequisites\n-------------\n\nBefore you try to issue a pass, be sure you do the following:\n\n- Complete all of the steps in the [Onboarding guide](../getting-started/onboarding-guide).\n- Create at least one [Passes Class](../use-cases/create#creating_a_passes_class).\n- Create at least one [Passes Object](../use-cases/create#creating_a_passes_object).\n- [Encode](../use-cases/jwt#encoding-a-pass-in-a-jwt) your Passes Class and Passes Object in a JWT.\n- [Sign](../use-cases/jwt#web,-email,-and-sms) your JWT with your Google Cloud service account key.\n\n1. Create an 'Add to Google Wallet' link\n----------------------------------------\n\nIssuing a pass with an 'Google Wallet' link adds the Passes Object to a user's Google Wallet, and can only be initiated in the context of a logged-in Google identity.\n\nThe 'Add to Google Wallet' link is a dynamically generated URL that contains an [encoded and signed JSON Web Token (JWT)](/wallet/retail/offers/web/jwt).\n\nThe Add to Google Wallet link has the following format: \n\n```\nhttps://pay.google.com/gp/v/save/\u003csigned_jwt\u003e\n```\n\nFor example, a fully-formed 'Add to Google Wallet' link will look something like this: \n\n```\nhttps://pay.google.com/gp/v/save/eyJhbGci6IkpXVCJ9.eyJhdWQiO...6EkC1Ahp6A\n```\n\nThis link can be embedded into websites, email, chat, SMS, or anywhere else that supports hyperlinks.\n| The safe length of an encoded JWT is 1800 characters. If your JWT is less than this limit, the entire object can be included in the signed JWT. If the length is over 1800 characters, the save may not work due to truncation by web browsers. See this [FAQ](/wallet/retail/offers/resources/faq#my-jwt-link-url-exceeds-the-1800-character-limit-browser-restriction.-what-should-i-do) for more info.\n\nFor more information on creating Passes Classes and Passes Objects, see [Create Passes Classes and Passes Objects](/wallet/retail/offers/web/create).\n\nFor more information on how to create the signed JWT needed to create an 'Add to Google Wallet' link, see [Working with JSON Web Tokens](/wallet/retail/offers/web/jwt).\n\n2. (Recommended) Use the 'Add to Google Wallet' button\n------------------------------------------------------\n\nFor any surfaces that support hyperlinking images, such as websites and email, it is recommended to present the 'Add to Google Wallet' link to your users with an 'Add to Google Wallet' button. For Google Wallet users, the button is a familiar prompt that is recognizable as a way to initiate adding a pass to their Google Wallet.\n- \n- \n\n[Image assets](/wallet/retail/offers/resources/brand-guidelines) are available to download in a variety of orientations and languages to support your Google Wallet API integration.\n\n[Download the 'Add to Google Wallet' button](/wallet/retail/offers/resources/brand-guidelines)"]]