내용으로 건너뛰기

IOS 월간 의무 청구 계획

GitHub

애플은 12개월 기간 동안 고객을 더 긴 12개월 기간에 대한 약속으로 청구하는 월간 구독을 지원합니다. StoreKit과 실행 중인 OS가 이 청구 계획을 지원할 때, @capgo/native-purchases StoreKit이 가격 조건을 노출하고 구매 시 월간 청구 계획을 선택할 수 있도록하고, 거래 및 갱신 정보에서 약속 메타데이터를 반환합니다.

월간 결제를 선호하는 사용자가 여전히 연간 약속과 예측 가능성의 유지를 원하는 연간 구독 제안을 위해 사용하세요.

요구 사항

요구 사항
  • 애플 스토어 연결 또는 Xcode의 StoreKit 테스트에서 12개월 약속 월간 청구 계획을 구성하세요.
  • Xcode SDK에서 StoreKit을 포함한 iOS 앱을 빌드하세요. pricingTerms context: Capgo 마케팅 웹사이트. 역할: 짧은 UI 레이블 또는 네비게이션 아이템. seen in: page trust.astro. Message key `and` (And). billingPlanType.
  • StoreKit 약속 청구 계획을 지원하는 iOS 버전에서 실행하세요.
  • 약속 가격 조건이 반환되지 않는 장치 또는 스토어 하우스에 표준 청구 옵션을 유지하세요.

가격 정보를 로드하고 표시하세요.

제목: 가격 정보를 로드하고 표시하세요.

호출 getProducts() context 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',
);

복사

스토어에서 제공하는 값을 렌더링하는 대신 하드 코딩된 가격을 렌더링하세요:필드
billingDisplayPrice사용하십시오.
billingPeriod사용자에게 표시되는 반복적인 청구 금액, 예를 들어 월간 청구 금액입니다.
commitmentInfo.priceString__CAPGO_KEEP_0__
commitmentInfo.period__CAPGO_KEEP_1__
subscriptionOffers__CAPGO_KEEP_2__

__CAPGO_KEEP_3__

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' 만약에 생략한다면, StoreKit은 제품의 기본 구매 동작을 사용합니다. billingPlanType__CAPGO_KEEP_6__

구독 약관 정보 읽기

구독 약관 정보 읽기

StoreKit이 제공하는 경우 거래에는 청구 플랜과 약속 진행 상황이 포함됩니다:

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);
}

Capgo 마케팅 웹사이트의 상위 수준 expirationDate 그리고 isActive 구매 승인에 필요한 권한 정보를 입력하세요. 사용 commitmentInfo.expirationDate 구매 승인에 필요한 권한 정보를 입력하세요. 사용

앱 스토어 리뷰 노트

앱 스토어 리뷰 노트 섹션
  • 구매 전 반복 청구 가격과 총 청구 가격을 모두 표시하세요.
  • 구매 버튼 근처에서 청구 기간을 명확하게 표시하세요.
  • 구매 승인에 필요한 권한 정보를 입력하세요. 사용 product.title, product.priceString, pricingTerms[].billingDisplayPrice, pricingTerms[].commitmentInfo.priceString StoreKit에서 고정된 가격 대신 가격을 가져오세요.
  • 구매 승인에 필요한 권한 정보를 입력하세요. 사용
관련 문서

iOS 월간 약속 청구 계획에서 계속 진행

iOS 월간 약속 청구 계획에서 계속 진행

iOS 월간 약속 청구 계획을 사용하여 지불과 구매를 계획하고 있다면 iOS 월간 약속 청구 계획을 사용하여 지불과 구매를 계획하고 있다면 Capgo/native-purchases를 사용하여 Using @capgo/native-purchases for the native capability in Using @capgo/native-purchases, Capgo Pricing for the product workflow in Capgo Pricing, 결제 시스템 결제 시스템의 구현 세부 정보에 대해 @capgo/native-purchases @capgo/native-purchases의 구현 세부 정보에 대해, 그리고 시작하기 시작하기의 구현 세부 정보에 대해