REST Resource: purchases.products
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
संसाधन: ProductPurchase
ProductPurchases संसाधन, उपयोगकर्ता के इन-ऐप्लिकेशन प्रॉडक्ट की खरीदारी की स्थिति के बारे में बताता है.
JSON के काेड में दिखाना |
{
"kind": string,
"purchaseTimeMillis": string,
"purchaseState": integer,
"consumptionState": integer,
"developerPayload": string,
"orderId": string,
"purchaseType": integer,
"acknowledgementState": integer,
"purchaseToken": string,
"productId": string,
"quantity": integer,
"obfuscatedExternalAccountId": string,
"obfuscatedExternalProfileId": string,
"regionCode": string,
"refundableQuantity": integer
} |
फ़ील्ड |
kind |
string
यह प्रकार androidpublisher सेवा में inappPurchase ऑब्जेक्ट दिखाता है.
|
purchaseTimeMillis |
string (int64 format)
अवधि (1 जनवरी, 1970) से मिलीसेकंड में, प्रॉडक्ट को खरीदे जाने का समय.
|
purchaseState |
integer
ऑर्डर की खरीदारी की स्थिति. संभावित वैल्यू ये हैं: 0. 1 खरीदा गया. रद्द किया गया 2. मंज़ूरी बाकी है
|
consumptionState |
integer
इन-ऐप्लिकेशन प्रॉडक्ट के इस्तेमाल की स्थिति. संभावित वैल्यू ये हैं: 0. अभी इस्तेमाल नहीं किया जा सका 1. उपभोग किया
|
developerPayload |
string
डेवलपर की ओर से तय की गई स्ट्रिंग, जिसमें किसी ऑर्डर के बारे में पूरक जानकारी होती है.
|
orderId |
string
ऐप्लिकेशन में खरीदे जा सकने वाले प्रॉडक्ट की खरीदारी से जुड़ा ऑर्डर आईडी.
|
purchaseType |
integer
इन-ऐप्लिकेशन प्रॉडक्ट की खरीदारी किस तरह की है. यह फ़ील्ड सिर्फ़ तब सेट किया जाता है, जब यह खरीदारी स्टैंडर्ड इन-ऐप्लिकेशन बिलिंग फ़्लो का इस्तेमाल करके नहीं की गई हो. संभावित वैल्यू ये हैं: 0. जांच करना (यानी कि किसी लाइसेंस टेस्टिंग खाते से खरीदा गया) 1. प्रोमो (उदाहरण के लिए, प्रोमो कोड का इस्तेमाल करके खरीदा गया). इसमें Play Points खरीदारी शामिल नहीं हैं. 2. इनाम वाला ऑफ़र मिला है. जैसे, पेमेंट करने के बजाय वीडियो विज्ञापन देखने पर मिला इनाम
|
acknowledgementState |
integer
इन-ऐप्लिकेशन प्रॉडक्ट को स्वीकार किए जाने की स्थिति. संभावित वैल्यू ये हैं: 0. अभी स्वीकार नहीं किया गया है 1. स्वीकृत
|
purchaseToken |
string
इस खरीदारी की पहचान करने के लिए, खरीदारी टोकन जनरेट किया गया. हो सकता है मौजूद न हो.
|
productId |
string
ऐप्लिकेशन में खरीदा जा सकने वाला प्रॉडक्ट SKU. हो सकता है मौजूद न हो.
|
quantity |
integer
इन-ऐप्लिकेशन प्रॉडक्ट की खरीदारी से जुड़ी संख्या. अगर यह एट्रिब्यूट मौजूद नहीं है, तो प्रॉडक्ट की संख्या एक होगी.
|
obfuscatedExternalAccountId |
string
आईडी का अस्पष्ट वर्शन, जो आपके ऐप्लिकेशन में उपयोगकर्ता के खाते से खास तौर पर जुड़ा होता है. यह जानकारी सिर्फ़ तब मौजूद होती है, जब खरीदारी के समय https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid का इस्तेमाल किया गया हो.
|
obfuscatedExternalProfileId |
string
आईडी का अस्पष्ट वर्शन, जो आपके ऐप्लिकेशन में उपयोगकर्ता की प्रोफ़ाइल से खास तौर पर जुड़ा होता है. यह जानकारी सिर्फ़ तब मौजूद होती है, जब खरीदारी के समय https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedprofileid का इस्तेमाल किया गया हो.
|
regionCode |
string
प्रॉडक्ट देते समय उपयोगकर्ता का ISO 3166-1 ऐल्फ़ा-2 बिलिंग क्षेत्र कोड.
|
refundableQuantity |
integer
रिफ़ंड के लिए ज़रूरी संख्या यानी वह संख्या, जिसका रिफ़ंड नहीं दिया गया है. इस वैल्यू से, संख्या के हिसाब से कुछ हिस्से के रिफ़ंड और पूरे रिफ़ंड का पता चलता है.
|
तरीके |
|
ऐप्लिकेशन में मौजूद आइटम की खरीदारी को स्वीकार करता है. |
|
ऐप्लिकेशन में मौजूद किसी आइटम की खरीदारी करता है. |
|
इन-ऐप्लिकेशन आइटम की खरीदारी और इस्तेमाल की स्थिति की जांच करता है. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe \u003ccode\u003eProductPurchase\u003c/code\u003e resource provides information about a user's in-app product purchase, including purchase time, state, and consumption status.\u003c/p\u003e\n"],["\u003cp\u003eIt contains details like the product ID, order ID, purchase token, and quantity, along with developer-specified payload and user account identifiers if provided.\u003c/p\u003e\n"],["\u003cp\u003eYou can use methods like \u003ccode\u003eacknowledge\u003c/code\u003e, \u003ccode\u003econsume\u003c/code\u003e, and \u003ccode\u003eget\u003c/code\u003e to manage the purchase and its state.\u003c/p\u003e\n"],["\u003cp\u003eThe resource includes fields for purchase state (purchased, canceled, pending), consumption state (consumed, not consumed), and acknowledgement state (acknowledged, not acknowledged).\u003c/p\u003e\n"]]],["The `ProductPurchase` resource details a user's in-app product purchase status, represented in JSON format with fields like `purchaseTimeMillis`, `purchaseState`, and `consumptionState`. It includes identifiers such as `orderId`, `purchaseToken`, and `productId`. Key actions involve using the methods `acknowledge` to confirm a purchase, `consume` to mark an item as used, and `get` to check the purchase status. The purchase also indicates quantity, purchase types, and refundable amounts.\n"],null,["# REST Resource: purchases.products\n\n- [Resource: ProductPurchase](#ProductPurchase)\n - [JSON representation](#ProductPurchase.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: ProductPurchase\n-------------------------\n\nA ProductPurchase resource indicates the status of a user's inapp product purchase.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"purchaseTimeMillis\": string, \"purchaseState\": integer, \"consumptionState\": integer, \"developerPayload\": string, \"orderId\": string, \"purchaseType\": integer, \"acknowledgementState\": integer, \"purchaseToken\": string, \"productId\": string, \"quantity\": integer, \"obfuscatedExternalAccountId\": string, \"obfuscatedExternalProfileId\": string, \"regionCode\": string, \"refundableQuantity\": integer } ``` |\n\n| Fields ||\n|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` This kind represents an inappPurchase object in the androidpublisher service. |\n| `purchaseTimeMillis` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970). |\n| `purchaseState` | `integer` The purchase state of the order. Possible values are: 0. Purchased 1. Canceled 2. Pending |\n| `consumptionState` | `integer` The consumption state of the inapp product. Possible values are: 0. Yet to be consumed 1. Consumed |\n| `developerPayload` | `string` A developer-specified string that contains supplemental information about an order. |\n| `orderId` | `string` The order id associated with the purchase of the inapp product. |\n| `purchaseType` | `integer` The type of purchase of the inapp product. This field is only set if this purchase was not made using the standard in-app billing flow. Possible values are: 0. Test (i.e. purchased from a license testing account) 1. Promo (i.e. purchased using a promo code). Does not include Play Points purchases. 2. Rewarded (i.e. from watching a video ad instead of paying) |\n| `acknowledgementState` | `integer` The acknowledgement state of the inapp product. Possible values are: 0. Yet to be acknowledged 1. Acknowledged |\n| `purchaseToken` | `string` The purchase token generated to identify this purchase. May not be present. |\n| `productId` | `string` The inapp product SKU. May not be present. |\n| `quantity` | `integer` The quantity associated with the purchase of the inapp product. If not present, the quantity is 1. |\n| `obfuscatedExternalAccountId` | `string` An obfuscated version of the id that is uniquely associated with the user's account in your app. Only present if specified using \u003chttps://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid\u003e when the purchase was made. |\n| `obfuscatedExternalProfileId` | `string` An obfuscated version of the id that is uniquely associated with the user's profile in your app. Only present if specified using \u003chttps://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedprofileid\u003e when the purchase was made. |\n| `regionCode` | `string` ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted. |\n| `refundableQuantity` | `integer` The quantity eligible for refund, i.e. quantity that hasn't been refunded. The value reflects quantity-based partial refunds and full refunds. |\n\n| Methods ------- ||\n|--------------------------------------------------------------------------------------|--------------------------------------------------------------|\n| ### [acknowledge](/android-publisher/api-ref/rest/v3/purchases.products/acknowledge) | Acknowledges a purchase of an inapp item. |\n| ### [consume](/android-publisher/api-ref/rest/v3/purchases.products/consume) | Consumes a purchase for an inapp item. |\n| ### [get](/android-publisher/api-ref/rest/v3/purchases.products/get) | Checks the purchase and consumption status of an inapp item. |"]]