apple / app-store-server-library-java

MIT License
169 stars 38 forks source link

How to determine the free trial period of renewal plan? #72

Closed hakusai22 closed 8 months ago

hakusai22 commented 8 months ago

I've been searching for a long time, but I can't find a user who purchased the renewal plan. It's currently in the free trial period. Can you help me answer this?

alexanderjordanbaker commented 8 months ago

Could you please provide more information about what type of information you have and what information you are trying to obtain?

hakusai22 commented 8 months ago

Thanks for the reply. I have found the free trial judgment by "offerDiscountType": "FREE_TRIAL"

{
    "originalTransactionId": "4100018xxx",
    "transactionId": "4100018xxx",
    "webOrderLineItemId": "4100018xxx",
    "bundleId": "com.xxx",
    "productId": "com.xxx",
    "subscriptionGroupIdentifier": "xx",
    "purchaseDate": 1709113907000,
    "originalPurchaseDate": 1709113908000,
    "expiresDate": 1709373107000,
    "quantity": 1,
    "type": "Auto-Renewable Subscription",
    "inAppOwnershipType": "PURCHASED",
    "signedDate": 1709114270682,
    "offerType": 1,
    "environment": "Production",
    "storefront": "IND",
    "storefrontId": "143467",
    "transactionReason": "PURCHASE",
    "price": 0,
    "currency": "INR",
    "offerDiscountType": "FREE_TRIAL" 
}