how to upgrade downgrade a subscription in iap 14.4 react native .80 #3089
Unanswered
HammadIqbal-1
asked this question in
Q&A
Replies: 2 comments 1 reply
-
|
Simply purchase the new subscription. iOS automatically handles upgrades/downgrades within the same subscription group: await requestPurchase({
request: {
ios: {sku: 'com.app.premium_yearly'},
},
type: 'subs',
});
// iOS handles everything - no extra code neededAndroid (Manual with Purchase Token)Get current subscription's // 1. Get current subscription
const purchases = await getAvailablePurchases();
const currentSub = purchases.find(p => p.productId === 'com.app.premium_monthly');
// 2. Purchase with replacement
await requestPurchase({
request: {
android: {
skus: ['com.app.premium_yearly'],
purchaseTokenAndroid: currentSub.purchaseToken, // Required for upgrade/downgrade
replacementModeAndroid: 1, // 1 = immediate upgrade, 6 = deferred downgrade
subscriptionOffers: [...],
},
},
type: 'subs',
});Replacement Modes (Android)
Multiple Active Subscriptions?
Full Documentation |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
let me see this then i will get back to you if it works or not |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If a user currently has a monthly subscription and wants to upgrade to a yearly plan, how should this be handled on Android and iOS?
Similarly, if a user already has a yearly subscription and wants to switch to a monthly plan, what’s the correct way to manage or cancel the existing subscription before activating the new one?
From the documentation, I see that both getActiveSubscriptions and activeSubscriptions return multiple active items, but when I check in the Google Play Store, it shows only the most recent subscription as active.
Can you clarify how this should be managed correctly across platforms? @hyochan
Beta Was this translation helpful? Give feedback.
All reactions