REST Resource: purchases.products
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
리소스: ProductPurchase
ProductPurchase 리소스는 사용자의 인앱 상품 구매 상태를 나타냅니다.
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)
제품이 구매된 시간을 에포크 기준 시간 (1970년 1월 1일) 이후 밀리초 단위로 나타낸 것입니다.
|
purchaseState |
integer
주문의 구매 상태입니다. 가능한 값은 0입니다. 구매일 1. 취소됨 2. 대기 중
|
consumptionState |
integer
인앱 상품의 소비 상태입니다. 가능한 값은 0입니다. 아직 소비되지 않음 1. 소비함
|
developerPayload |
string
주문의 추가 정보가 포함된 개발자 지정 문자열입니다.
|
orderId |
string
인앱 상품의 구매와 연결된 주문 ID입니다.
|
purchaseType |
integer
인앱 상품의 구매 유형입니다. 이 필드는 표준 인앱 결제 흐름을 사용하여 구매하지 않은 경우에만 설정됩니다. 가능한 값은 0입니다. 테스트 (라이선스 테스트 계정에서 구매) 1. 프로모션 (프로모션 코드를 사용하여 구매) Play 포인트 구매는 포함되지 않습니다. 2. 보상형 광고 (즉, 유료 광고 대신 동영상 광고 시청)
|
acknowledgementState |
integer
인앱 상품의 확인 상태입니다. 가능한 값은 0입니다. 아직 승인되지 않음 1. 확인됨
|
purchaseToken |
string
이 구매를 식별하기 위해 생성된 구매 토큰입니다. 없을 수 있습니다.
|
productId |
string
인앱 상품 SKU입니다. 없을 수 있습니다.
|
quantity |
integer
인앱 상품 구매와 연결된 수량입니다. 없는 경우 수량은 1입니다.
|
obfuscatedExternalAccountId |
string
앱에서 사용자 계정과 고유하게 연결된 ID의 난독화된 버전입니다. 구매가 이루어졌을 때 https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid를 사용하여 지정된 경우에만 표시됩니다.
|
obfuscatedExternalProfileId |
string
앱 내 사용자 프로필과 고유하게 연결된 ID의 난독화된 버전입니다. 구매가 이루어졌을 때 https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedprofileid를 사용하여 지정된 경우에만 표시됩니다.
|
regionCode |
string
제품이 부여된 시점 사용자의 ISO 3166-1 alpha-2 청구 지역 코드입니다.
|
refundableQuantity |
integer
환불 가능한 수량, 즉 환불되지 않은 수량입니다. 이 값은 수량 기준 부분 환불과 전액 환불을 반영합니다.
|
메서드 |
|
인앱 상품의 구매를 확인합니다. |
|
인앱 상품 구매를 소비합니다. |
|
인앱 상품의 구매 및 소비 상태를 확인합니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 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. |"]]