Method: purchases.subscriptions.get

지원 중단됨: 대신 purchases.subscriptionsv2.get을 사용하세요. 사용자의 정기 결제 구매가 유효한지 확인하고 만료 시간을 반환합니다.

HTTP 요청

GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}

URL은 gRPC 트랜스코딩 문법을 사용합니다.

경로 매개변수

매개변수
packageName

string

이 정기 결제를 구매한 애플리케이션의 패키지 이름입니다 (예: 'com.some.thing').

subscriptionId

string

구매한 정기 결제 ID입니다 (예: 'monthly001').

token

string

정기 결제를 구매했을 때 사용자 기기에 제공된 토큰입니다.

요청 본문

요청 본문은 비어 있어야 합니다.

응답 본문

성공한 경우 응답 본문에 SubscriptionPurchase의 인스턴스가 포함됩니다.

샘플

다음은 샘플 요청입니다.

curl -X GET \   'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.app/purchases/subscriptions/monthly.premium/tokens/abcdefghijklmnopqrstuvwxyz.0123456789' \   -H 'Accept: application/json'

다음은 샘플 응답입니다.

{   "kind": "androidpublisher#subscriptionPurchase",   "startTimeMillis": "1678886400000",   "expiryTimeMillis": "1710470400000",   "autoRenewing": true,   "priceCurrencyCode": "USD",   "priceAmountMicros": "9990000",   "introductoryPriceInfo": {     "introductoryPriceCurrencyCode": "USD",     "introductoryPriceAmountMicros": "4990000",     "introductoryPricePeriod": "P1M",     "introductoryPriceCycles": 1   },   "countryCode": "US",   "developerPayload": "{\"userId\": \"user12345\", \"source\": \"app-promo\"}",   "paymentState": 1,   "cancelReason": 0,   "userCancellationTimeMillis": "1709251200000",   "cancelSurveyResult": {     "cancelSurveyReason": 3,     "userInputCancelReason": null   },   "orderId": "GPA.3344-5566-7788-99001",   "linkedPurchaseToken": null,   "purchaseType": 0,   "priceChange": null,   "profileName": "Jane Doe",   "emailAddress": "[email protected]",   "givenName": "Jane",   "familyName": "Doe",   "profileId": "109876543210987654321",   "acknowledgementState": 1,   "externalAccountId": "user-jane-doe-app-id",   "promotionType": 1,   "promotionCode": "WELCOME20",   "obfuscatedExternalAccountId": "obfUaCcOunTId123",   "obfuscatedExternalProfileId": "obfPrOfiLeId456",   "autoResumeTimeMillis": null }

승인 범위

다음 OAuth 범위가 필요합니다.

  • https://www.googleapis.com/auth/androidpublisher