is_in_intro_offer_period is not work anymore and the verifyReceipt endpoint is also deprecated.
https://developer.apple.com/documentation/appstorereceipts/requestbody
and,
If you need to determine whether the current subscription is within the free trial period,
you can call check if (expires_date_ms - purchase_date_ms) is less than the specified period.
https://developer.apple.com/documentation/appstoreserverapi/jwstransactiondecodedpayload
let purchase_date_ms = parseInt(latest_transcation.purchaseDate)
let expires_date_ms = parseInt(latest_transcation.expiresDate)
let duration = expires_date_ms - purchase_date_ms
var isInIntroOfferPeriod = false
// free period in your introoffer
// for example: 3 days free trial in my yearly subscription
if (duration > 0 && duration <= 3*86400000) {
isInIntroOfferPeriod = true
}
Topic:
App & System Services
SubTopic:
StoreKit
Tags: