iOS 월간 약정 청구 계획
__CAPGO_KEEP_3__
__CAPGO_KEEP_10__ @capgo/native-purchases __CAPGO_KEEP_11__
이 옵션은 연간 구독 제안을 위해 사용합니다. 사용자는 월별 결제를 선호하지만 여전히 연간 약속의 예측 가능성과 유지 보수성을 원합니다.
요구 사항
설정- App Store Connect 또는 Xcode의 StoreKit Testing에서 12 개월의 약속 결제 플랜을 월별로 구성하십시오.
- Xcode SDK에 StoreKit을 포함하여 iOS 앱을 빌드하십시오.
pricingTermsStoreKit 약속 결제 플랜을 지원하는 iOS 버전에서 실행하십시오.billingPlanType. - 결제 약속 가격 조건을 반환하지 않는 장치 또는 매장에 대해 표준 결제 옵션을 유지하십시오.
- 주의
__CAPGO_KEEP_0__
__CAPGO_KEEP_1____CAPGO_KEEP_2__ getProducts() __CAPGO_KEEP_3__ pricingTerms.
import { NativePurchases, PURCHASE_TYPE } from '@capgo/native-purchases';
const { products } = await NativePurchases.getProducts({ productIdentifiers: ['com.example.app.premium.yearly'], productType: PURCHASE_TYPE.SUBS,});
const premiumYearly = products.find( (product) => product.identifier === 'com.example.app.premium.yearly',);const monthlyCommitment = premiumYearly?.pricingTerms?.find( (term) => term.billingPlanType === 'monthly',);__CAPGO_KEEP_5__
| __CAPGO_KEEP_6__ | __CAPGO_KEEP_7__ |
|---|---|
billingDisplayPrice | __CAPGO_KEEP_8__ |
billingPeriod | __CAPGO_KEEP_9__ |
commitmentInfo.priceString | __CAPGO_KEEP_10__ |
commitmentInfo.period | __CAPGO_KEEP_11__ |
subscriptionOffers | 가격 조건에 부여된 소개 또는 홍보적 제안. |
예시 paywall 복사본:
function commitmentLabel(term: NonNullable<typeof monthlyCommitment>) { const total = term.commitmentInfo?.priceString; return total ? `${term.billingDisplayPrice} billed monthly, ${total} total commitment` : term.billingDisplayPrice;}월간 의무 계약 플랜을 구매하세요
월간 의무 계약 플랜을 구매하는 섹션월간 의무 계약 플랜을 선택할 때 billingPlanType: 'monthly'.
const transaction = await NativePurchases.purchaseProduct({ productIdentifier: 'com.example.app.premium.yearly', productType: PURCHASE_TYPE.SUBS, billingPlanType: 'monthly', appAccountToken: userStoreUuid,});사용 billingPlanType: 'upFront' 표준 전면 청구 플랜을 명시적으로 선택해야 하는 경우에만 사용하세요. 만약 billingPlanTypeStoreKit은 제품에 대한 기본 구매 동작을 사용합니다.
약속 메타데이터 읽기
‘약속 메타데이터 읽기’라는 섹션스토어 키트에서 제공하는 경우, 거래에는 청구 계획과 약속 진행 상황이 포함됩니다.
if (transaction.billingPlanType === 'monthly') { console.log('Current billing period:', transaction.commitmentInfo?.billingPeriodNumber); console.log('Total billing periods:', transaction.commitmentInfo?.totalBillingPeriods); console.log('Commitment ends:', transaction.commitmentInfo?.expirationDate); console.log('Commitment total:', transaction.commitmentInfo?.price);}약속 상태의 다음 상태가 포함된 재발급 정보가 있습니다:
const { purchases } = await NativePurchases.getPurchases({ productType: PURCHASE_TYPE.SUBS, onlyCurrentEntitlements: true,});
for (const purchase of purchases) { const commitment = purchase.renewalInfo?.commitmentInfo; if (!commitment) continue;
console.log('Renews into another commitment:', commitment.willAutoRenew); console.log('Next billing plan:', commitment.renewalBillingPlanType); console.log('Next renewal date:', commitment.renewalDate);}상위 수준의 expirationDate 와 isActive 필드를 사용하여 권한 결정을 하세요. __CAPGO_KEEP_1__을 사용하여 고객에게 전체 약속 기간을 설명하세요. commitmentInfo.expirationDate __CAPGO_KEEP_1__을 사용하여 고객에게 전체 약속 기간을 설명하세요.
앱 스토어 리뷰 노트
앱 스토어 리뷰 노트 섹션- 구매 전에 반복 청구 가격과 총 약정 가격을 모두 표시합니다.
- 구매 버튼 근처에서 약정 기간을 명확하게 표시합니다.
- StoreKit에서 hardcoded 가격 대신
product.title,product.priceString,pricingTerms[].billingDisplayPrice,pricingTerms[].commitmentInfo.priceString를 사용합니다. - 구매wall 또는 계정 화면에서 구입 재구매 및 구독 관리 액션을 제공합니다.
관련 가이드
앱 스토어 리뷰 노트 섹션iOS 월간 약정 요금 청구 계획에서 계속
iOS 월간 약정 요금 청구 계획에서 계속하는 부분이미 사용 중이라면 iOS 월간 약정 요금 청구 계획 결제 및 구매를 계획하고 관리하기 위해 Cloudflare의 native-purchases를 @capgo와 연결 Cloudflare의 native-purchases를 사용하는 경우 @capgo의 native-purchases를 사용 Cloudflare의 Capgo 가격 Cloudflare의 제품 워크플로우에서 Capgo 가격 결제 시스템 결제 시스템 구현 세부 사항 @capgo/native-purchases for the implementation detail in @capgo/native-purchases, and Getting Started Getting Started 구현 세부 사항에 대해