Pay
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003ePay\u003c/code\u003e is the entry point for the Google Pay API.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to create a \u003ccode\u003ePayClient\u003c/code\u003e for interacting with the Google Pay service.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePayClient\u003c/code\u003e can be created for use within an \u003ccode\u003eActivity\u003c/code\u003e or a general \u003ccode\u003eContext\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should use the appropriate \u003ccode\u003egetClient\u003c/code\u003e method based on where the client will be used.\u003c/p\u003e\n"]]],[],null,["# Pay\n\npublic class **Pay** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nEntry point for Pay API. \n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [PayClient](/android/reference/com/google/android/gms/pay/PayClient) | [getClient](/android/reference/com/google/android/gms/pay/Pay#getClient(android.app.Activity))([Activity](//developer.android.com/reference/android/app/Activity.html) activity) Creates a new instance of [PayClient](/android/reference/com/google/android/gms/pay/PayClient) for use in an [Activity](//developer.android.com/reference/android/app/Activity.html). |\n| static [PayClient](/android/reference/com/google/android/gms/pay/PayClient) | [getClient](/android/reference/com/google/android/gms/pay/Pay#getClient(android.content.Context))([Context](//developer.android.com/reference/android/content/Context.html) context) Creates a new instance of [PayClient](/android/reference/com/google/android/gms/pay/PayClient) for use in a non-`Activity` [Context](//developer.android.com/reference/android/content/Context.html). |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public static [PayClient](/android/reference/com/google/android/gms/pay/PayClient)\n**getClient** ([Activity](//developer.android.com/reference/android/app/Activity.html) activity)\n\nCreates a new instance of [PayClient](/android/reference/com/google/android/gms/pay/PayClient) for\nuse in an [Activity](//developer.android.com/reference/android/app/Activity.html). This\nclient should not be used outside of the given `Activity`. \n\n#### public static [PayClient](/android/reference/com/google/android/gms/pay/PayClient)\n**getClient** ([Context](//developer.android.com/reference/android/content/Context.html) context)\n\nCreates a new instance of [PayClient](/android/reference/com/google/android/gms/pay/PayClient) for\nuse in a non-`Activity` [Context](//developer.android.com/reference/android/content/Context.html)."]]