내용으로 건너뛰기

iOS 구독 그룹 만들기

구독 그룹은 iOS 앱에서 여러 구독 수준을 관리하고 조직하는 데 필수적입니다. 그들이 작동하는 방식을 이해하는 것은 업그레이드, 다운그레이드 및 크로스 그레이드 기능을 구현하는 데 중요합니다.

구독 그룹이란 무엇인가요?

구독 그룹이란 무엇인가요?

__CAPGO_KEEP_0__

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__

__CAPGO_KEEP_3__

  • __CAPGO_KEEP_4____CAPGO_KEEP_5__
  • __CAPGO_KEEP_6____CAPGO_KEEP_7__
  • __CAPGO_KEEP_8____CAPGO_KEEP_9__
  • __CAPGO_KEEP_10____CAPGO_KEEP_11__

그룹 내에서 각 구독은 가장 높은 가치 (레벨 1)부터 가장 낮은 가치까지 순위를 매깁니다. 이 순위는 구독 변경이 분류되는 방법을 결정합니다.

구독 그룹 계층

레벨 예시

레벨 1

(가장 높은 가치) 프리미엄 연간 ($99.99/년)

  • 최종 월간 ($19.99/월)
  • 레벨 2

(중간 가치) 레벨 3

  • __CAPGO_KEEP_0__ (년)
  • __CAPGO_KEEP_1__ (월)

등급 3 (가장 낮은 가격)

  • __CAPGO_KEEP_2__ (년)
  • __CAPGO_KEEP_0__ (월)

구독 변경 유형

구독 변경 유형

애플은 등급 순위에 따라 3 가지 유형의 구독 변경을 자동으로 처리합니다.

1. 업그레이드

등급

등급을 상위 등급 구독 등급 하향 (예: level 2 → level 1).

행동:

  • 효과 즉시
  • 사용자는 잔여 시간에 대한 부분 환급을 받습니다.
  • 새로운 구독은 즉시 시작됩니다.

예시:

// User currently has: Standard Monthly (Level 2)
// User upgrades to: Premium Annual (Level 1)
// Result: Immediate access to Premium, refund for unused Standard time

하위 등급 하위 등급으로 변경 (예: 등급 1 → 등급 2). 행동:

다음 갱신일부터

  • 현재 구독을 유지합니다. 기간이 끝날 때까지 갱신 후 자동으로 새로운 구독이 시작됩니다.
  • 예시:
  • 클립보드에 복사

4. 등급 변경

// User currently has: Premium Annual (Level 1)
// User downgrades to: Standard Monthly (Level 2)
// Result: Premium access continues until annual renewal date, then switches

__CAPGO_KEEP_0__

3. 다운그레이드

다른 구독으로 전환 같은 티어 레벨에서.

기간에 따라 행동이 달라집니다:

다른 기간다운그레이드

  • 다음 재정의 시점에 적용
  • 예: 월간 프리미엄 (레벨 1) → 연간 프리미엄 (레벨 1)

같은 기간업그레이드

  • __CAPGO_KEEP_0__
  • 예시: 프리미엄 월간 (레벨 1) → 최고 월간 (레벨 1)

__CAPGO_KEEP_1__

구독 그룹 만들기
  1. 구독으로 이동

    앱 스토어 연결에서 앱을 선택하고 수익 > 구독.

  2. __CAPGO_KEEP_2__

    새로운 그룹 만들기 + 그룹 이름

  3. 구독 그룹의 이름을 선택하세요:

    __CAPGO_KEEP_3__

    • “Premium Access”
    • “Cloud Storage Plans”
    • “Pro 기능”
  4. 구독 추가

    그룹을 생성한 후, 각 구독에 등급을 부여합니다. 등급은 순위를 나타냅니다.

  5. 등급 설정

    가장 높은 가격의 구독부터 가장 낮은 가격의 구독 순으로 배열합니다. 고려해야 할 사항은:

    • 년간 구독은 월간 구독보다 등급이 높습니다.
    • 가격이 높은 구독은 가격이 낮은 구독보다 등급이 높습니다.
    • 최종/최상위 구독은 등급이 가장 높습니다.

앱에서 사용하는 방법

앱에서 사용하는 방법

native-purchases 플러그인은 자동으로 구독 그룹 논리를 처리합니다.:

import { NativePurchases, PURCHASE_TYPE } from '@capgo/native-purchases';
// Fetch all subscriptions in a group
const { products } = await NativePurchases.getProducts({
productIdentifiers: ['premium_monthly', 'premium_annual', 'ultimate_monthly'],
productType: PURCHASE_TYPE.SUBS,
});
// Display current subscription using StoreKit transactions
const { purchases } = await NativePurchases.getPurchases({
productType: PURCHASE_TYPE.SUBS,
});
const activeSubs = purchases.filter((purchase) => purchase.isActive);
// Detect pending downgrade/cancellation (StoreKit sets willCancel === true)
const pendingChange = purchases.find((purchase) => purchase.willCancel === true);
if (pendingChange) {
console.log('Subscription will stop auto-renewing on', pendingChange.expirationDate);
}
// Purchase (StoreKit handles upgrades/downgrades automatically)
await NativePurchases.purchaseProduct({
productIdentifier: 'premium_annual',
productType: PURCHASE_TYPE.SUBS,
});
// Listen for StoreKit updates (fires on upgrades/downgrades/refunds)
NativePurchases.addListener('transactionUpdated', (transaction) => {
console.log('Subscription updated:', transaction);
});

구독 변경 처리

구독 변경 처리

변경 유형 감지

변경 유형 감지
import { NativePurchases, PURCHASE_TYPE } from '@capgo/native-purchases';
// Get current subscription info
const { purchases } = await NativePurchases.getPurchases({
productType: PURCHASE_TYPE.SUBS,
});
const currentSubscription = purchases.find(
(purchase) => purchase.subscriptionState === 'subscribed',
);
if (currentSubscription) {
// StoreKit reports if user cancelled auto-renew
if (currentSubscription.willCancel) {
console.log(
`User cancelled. Access remains until ${currentSubscription.expirationDate}`,
);
}
if (currentSubscription.isUpgraded) {
console.log('User recently upgraded to this plan.');
}
}
// Listen for automatic upgrades/downgrades
NativePurchases.addListener('transactionUpdated', (transaction) => {
console.log('Subscription changed!', transaction);
if (transaction.subscriptionState === 'revoked') {
revokeAccess();
} else if (transaction.isActive) {
unlockPremiumFeatures();
}
});

업그레이드:

“프리미엄 기능에 즉시 접근하실 수 있습니다. 현재 구독을 프로라이트합니다.”

__CAPGO_KEEP_0__

For Downgrades:

“이용 기간이 [renewal date]까지 유지되며, 그 이후부터는 표준 서비스로 전환됩니다.”

For Crossgrades:

“다음 재결제일인 [date]부터는 연간 결제로 변경됩니다.”

Best Practices transactionUpdated 그룹 조직

Group Organization

Server monitoring

Use Apple’s App Store Server Notifications v2 or your own receipt-validation backend to mirror StoreKit changes in your database. Pair server notifications with the listener so both client and backend stay in sync.

Best Practices
  • 관련된 구독을 동일한 그룹에 유지하세요
  • 비관련된 기능을 섞지 마세요 (예: 저장소 및 광고 제거)
  • 다른 기능 세트에 대한 별도의 그룹을 생성하세요

레벨 랭킹 전략

레벨 랭킹 전략
  • 년간 계획 → 동일한 등급의 경우 월간보다 높은 등급
  • 고가의 등급 → 높은 등급
  • 가치뿐만 아니라 가격만큼 고려하세요

사용자 경험

사용자 경험
  • 현재 구독을 명확하게 표시하세요
  • 그룹 내에 모든 사용 가능한 옵션을 표시하세요
  • 즉시 적용 vs. 갱신 시 변경
  • 계획 간 쉬운switching을 허용

테스트

테스트
  • 업그레이드 모든 시나리오 테스트
  • 다운그레이드 모든 시나리오 테스트
  • 크로스 그레이드 동작 확인
  • 웹 훅 호출 확인

일반적인 시나리오

테스트

시나리오 1: 월간 3계층 계획

테스트
Level 1: Ultimate Monthly ($19.99)
Level 2: Premium Monthly ($9.99)
Level 3: Basic Monthly ($4.99)
  • 기본 → 프리미엄: 즉시 업그레이드
  • 프리미엄 → 최고급: 즉시 업그레이드
  • 최고급 → 프리미엄: 갱신 시 다운그레이드
  • 기본 → 최고급: 즉시 업그레이드

시나리오 2: 혼합 지속 기간 계획

시나리오 2: 혼합 지속 기간 계획
Level 1: Premium Annual ($99.99/year)
Level 2: Premium Monthly ($9.99/month)
  • 월 → 연: 갱신 시 크로스 그레이드
  • 연 → 월: 갱신 시 다운그레이드

시나리오 3: 다중 층 다중 지속 기간

시나리오 3: 다중 층 다중 지속 기간
Level 1: Ultimate Annual ($199/year)
Level 2: Ultimate Monthly ($19.99/month)
Level 3: Premium Annual ($99/year)
Level 4: Premium Monthly ($9.99/month)
Level 5: Basic Annual ($49/year)
Level 6: Basic Monthly ($4.99/month)

이 설정은 최고의 유연성을 유지하면서 명확한 업그레이드/다운그레이드 로직을 제공합니다.

그룹에 표시되지 않는 구독:

  • 그룹에 할당된 것이 정확한지 확인하세요
  • 최소 “제출 준비” 상태 이상인지 확인하세요
  • 제품 ID가 정확한지 확인하세요

업그레이드/다운그레이드 동작이 잘못된 경우:

  • 레벨 순위 검토 (1 = 가장 높은 순위)
  • 구독 계층이 합리적인지 확인하세요
  • 레벨이 정확하게 설정되어 있는지 확인하세요

다양한 그룹의 제품:

  • 다중 그룹에 가입한 사용자는 여러 그룹에 동시에 구독할 수 있습니다
  • 이것은 의도적인 설계입니다 - 관련 제품을 동일한 그룹에 유지합니다

getActiveProducts가 여러 구독을 보여주는 경우:

  • 구독이 다른 그룹에 있는지 확인합니다
  • Family Sharing를 통해 사용자가 구독하지 않았는지 확인합니다
  • App Store Connect에서 구독 상태를 확인합니다

추가 리소스

추가 리소스 섹션

자세한 내용은 Apple 공식 문서에서 구독 그룹에 대한 설명을 참조하십시오.