Hey @Germán Buela ,
We don’t have the information for a pending renewal in purchaerInfo, but we do have a workaround with using webhooks. When a user makes a product change, a webhook will be sent out with the event type PRODUCT_CHANGE. Here is an example of this type of webhook :
{
"event" : {
"event_timestamp_ms" : 1601338594769,
"product_id" : "com.revenuecat.myapp.monthly",
"period_type" : "NORMAL",
"purchased_at_ms" : 1601304429682,
"expiration_at_ms" : 1601311606660,
"environment" : "PRODUCTION",
"entitlement_id" : "subscription",
"entitlement_ids" : [
"subscription"
],
"presented_offering_id" : "defaultoffering",
"transaction_id" : "GPA.1234-1234-1234-12345",
"original_transaction_id" : "GPA.1234-1234-1234-12345",
"app_user_id" : "$RCAnonymousID:12345678-1234-1234-1234-123456789123",
"aliases" : [
"$RCAnonymousID:12345678-1234-1234-1234-123456789123"
],
"original_app_user_id" : "$RCAnonymousID:12345678-1234-1234-1234-123456789123",
"new_product_id" : "com.revenuecat.myapp.yearly",
"currency" : "USD",
"price" : 0,
"price_in_purchased_currency" : 0,
"subscriber_attributes" : {},
"store" : "PLAY_STORE",
"takehome_percentage" : 0.70,
"type" : "PRODUCT_CHANGE",
"id" : "12345678-1234-1234-1234-12345678912"
},
"api_version" : "1.0"
}
In the webhook you get :
-
product_id
: Old product ID you are switching from
-
new_product_id
: New Product ID you are switching to
-
Expiration_at_ms
: Expiration date of old product
With this information you could store this on your backend and relay the information and possibly disable B subscription ( as you described in your example).