내용으로 건너뛰기

iOS 월간 의무 청구 계획

GitHub

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

이것을 연간 구독 제안에 사용하세요. 사용자가 월별 결제를 선호하지만 여전히 연간 약속과 예측 가능성을 원하는 경우.

요구 사항

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

, 그리고 안드로이드는 무시합니다.

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

‘가격 정보를 로드하고 표시하세요.’라는 제목의 섹션 getProducts() 호출하세요. 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',
);

지원되는 iOS 구독 제품의 경우 각 제품에는

클립보드 복사스토어에서 제공하는 값을 렌더링하는 대신 하드 코딩된 가격을 렌더링하세요:
billingDisplayPrice필드
billingPeriod이것을 사용하세요.
commitmentInfo.priceString__CAPGO_KEEP_0__
commitmentInfo.period__CAPGO_KEEP_0__
subscriptionOffers__CAPGO_KEEP_0__

__CAPGO_KEEP_0__

function commitmentLabel(term: NonNullable<typeof monthlyCommitment>) {
const total = term.commitmentInfo?.priceString;
return total
? `${term.billingDisplayPrice} billed monthly, ${total} total commitment`
: term.billingDisplayPrice;
}

__CAPGO_KEEP_2__

__CAPGO_KEEP_3__

__CAPGO_KEEP_4__ billingPlanType: 'monthly'.

const transaction = await NativePurchases.purchaseProduct({
productIdentifier: 'com.example.app.premium.yearly',
productType: PURCHASE_TYPE.SUBS,
billingPlanType: 'monthly',
appAccountToken: userStoreUuid,
});

__CAPGO_KEEP_6__ billingPlanType: 'upFront' __CAPGO_KEEP_7__ billingPlanType__CAPGO_KEEP_8__

구독 약관 정보 읽기

구독 약관 정보 읽기

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 expirationDateisActive 구독 결정에 필요한 field입니다. 사용 commitmentInfo.expirationDate 구독 기간을 고객에게 완전하게 설명하기 위해

앱 스토어 리뷰 노트

제목 ‘앱 스토어 리뷰 노트’
  • 구독 가격과 총 구독 기간을 구매하기 전에 보여주세요.
  • 구독 기간을 구매 버튼 근처에 명확하게 표시하세요.
  • 사용 product.title, product.priceString, pricingTerms[].billingDisplayPrice, 그리고 pricingTerms[].commitmentInfo.priceString StoreKit에서 hardcoded 가격 대신 가격을 가져옵니다.
  • 구독 구매 화면이나 계정 화면에서 구독 구매 복원 및 구독 관리 액션을 제공하세요.

iOS 월간 약속 결제 계획에서 계속

iOS 월간 약속 결제 계획에서 계속하는 방법

iOS 월간 약속 결제 계획을 사용하여 iOS 월간 약속 결제 계획을 사용하여 __CAPGO_KEEP_0__ native-purchases를 사용하여 capgo native-purchases의 native 기능을 사용하여 capgo 가격 Capgo 가격의 제품 워크플로우 Capgo native-purchases를 사용하여 결제 시스템 결제 시스템 구현에 대한 세부 정보 @capgo/native-purchases @capgo/native-purchases 구현에 대한 세부 정보, 그리고 시작하기 시작하기 구현에 대한 세부 정보