Discussions
API: Active access level when subscription is not active
about 2 years ago by Zdenek Topic
Hello,
I am seeing weird response from API.
As you can see in the below response, the standard subscription is not active , but the access_level is. I upgraded the use to the premium.
{
app_id: 'xxx',
profile_id: '767a3aef-e429-463c-85fb-978308646873',
customer_user_id: 'xxx',
paid_access_levels: {
standard: {
id: 'standard',
is_active: true,
is_lifetime: false,
expires_at: '2022-02-28T20:17:02.000000+0000',
starts_at: null,
will_renew: false,
vendor_product_id: 'xxx.pricingPlan.standard',
store: 'app_store',
activated_at: '2022-01-16T14:41:53.000000+0000',
renewed_at: '2022-01-29T21:12:02.000000+0000',
unsubscribed_at: null,
billing_issue_detected_at: null,
is_in_grace_period: false,
active_introductory_offer_type: null,
active_promotional_offer_type: null,
active_promotional_offer_id: null,
cancellation_reason: null,
is_refund: false
},
premium: {
id: 'premium',
is_active: true,
is_lifetime: false,
expires_at: '2022-01-29T21:41:19.000000+0000',
starts_at: null,
will_renew: true,
vendor_product_id: 'xxx.pricingPlan.premium',
store: 'app_store',
activated_at: '2022-01-16T14:41:53.000000+0000',
renewed_at: '2022-01-29T21:36:19.000000+0000',
unsubscribed_at: null,
billing_issue_detected_at: null,
is_in_grace_period: false,
active_introductory_offer_type: null,
active_promotional_offer_type: null,
active_promotional_offer_id: null,
cancellation_reason: null,
is_refund: false
}
},
subscriptions: {
'xxx.pricingPlan.standard': {
is_active: false,
is_lifetime: false,
expires_at: '2022-01-29T21:17:02.000000+0000',
starts_at: null,
will_renew: true,
vendor_product_id: 'xxx.pricingPlan.standard',
vendor_transaction_id: '1000000959148009',
vendor_original_transaction_id: '1000000949843940',
store: 'app_store',
activated_at: '2022-01-16T14:41:53.000000+0000',
renewed_at: '2022-01-29T21:12:02.000000+0000',
unsubscribed_at: null,
billing_issue_detected_at: null,
is_in_grace_period: false,
active_introductory_offer_type: null,
active_promotional_offer_type: null,
active_promotional_offer_id: null,
cancellation_reason: null,
is_sandbox: true,
is_refund: false
},
'xxx.pricingPlan.premium': {
is_active: true,
is_lifetime: false,
expires_at: '2022-01-29T21:41:19.000000+0000',
starts_at: null,
will_renew: true,
vendor_product_id: 'xxx.pricingPlan.premium',
vendor_transaction_id: '1000000959153214',
vendor_original_transaction_id: '1000000949843940',
store: 'app_store',
activated_at: '2022-01-16T14:41:53.000000+0000',
renewed_at: '2022-01-29T21:36:19.000000+0000',
unsubscribed_at: null,
billing_issue_detected_at: null,
is_in_grace_period: false,
active_introductory_offer_type: null,
active_promotional_offer_type: null,
active_promotional_offer_id: null,
cancellation_reason: null,
is_sandbox: true,
is_refund: false
}
},
non_subscriptions: null,
promotional_offer_eligibility: false,
introductory_offer_eligibility: false,
custom_attributes: {}
}