인앱 결제를 Capacitor 앱에 추가하세요
Adapty의 Capacitor SDK를 사용해 iOS와 Android에서 인앱 결제를 통합하세요. 영수증 처리, 구독 상태 추적, 백엔드 구축이 필요 없습니다. 모든 기능이 한 번의 통합에 담겨 있습니다.
import { adapty } from '@adapty/capacitor';
try {
await adapty.activate({
apiKey: 'YOUR_PUBLIC_SDK_KEY',
params: {
logLevel: 'verbose',
__ignoreActivationOnFastRefresh: true,
}
});
console.log('Adapty activated successfully!');
} catch (error) {
console.error('Failed to activate Adapty SDK:', error);
}
Capacitor 인앱 결제를 위한 백엔드를 직접 구축할 필요가 없습니다
Adapty의 SDK가 일반적으로 서버에서 수행되는 모든 작업을 처리합니다: 영수증 검증, 구독 상태, 갱신, 체험, 환불 등. 한 번 연결하면 iOS와 Android에서 작동하는 Capacitor 인앱 결제 설정을 바로 사용할 수 있습니다.
데모 예약Adapty SDK를 선택해야 하는 이유
플랫폼 간 구독 상태 추적
iOS와 Android 전반에서 사용자가 활성 구독을 유지하고 있는지 항상 알 수 있습니다.
백엔드에서 영수증 검증
Adapty가 검증을 대신 처리하므로 직접 구축할 필요가 없습니다.
모든 종류의 구독 상태 관리
무료 체험, 업그레이드, 프로모션, 가족 공유, 갱신 등 모든 케이스를 처리합니다.
엔터프라이즈급 코어로 확장
자주 업데이트를 제공하고 SDK를 안정적으로 유지하며, SLA 99.99% 이상을 보장합니다.
플랫폼 구성
Adapty SDK 설치
await adapty.activate( 'PUBLIC_SDK_KEY', { customerUserId: 'YOUR_USER_ID', });
구매 이벤트 처리
Capacitor용 간편 통합
몇 시간 만에 Adapty SDK를 설정하고 iOS 및 Android에서 인앱 결제를 시작하세요. 도움이 필요하신가요? 전체 Capacitor IAP 튜토리얼을 확인하세요.
Capacitor IAP를 처리하는 5가지 SDK 메서드 사용
import { adapty } from '@adapty/capacitor';
try {
const result = await adapty.makePurchase({ product });
if (result.type === 'success') {
const isSubscribed = result.profile?.accessLevels['YOUR_ACCESS_LEVEL']?.isActive;
if (isSubscribed) {
// Grant access to the paid features
console.log('User is now subscribed!');
}
} else if (result.type === 'user_cancelled') {
console.log('Purchase cancelled by user');
} else if (result.type === 'pending') {
console.log('Purchase is pending');
}
} catch (error) {
console.error('Purchase failed:', error);
}
import { adapty } from '@adapty/capacitor';
try {
const profile = await adapty.restorePurchases();
const isSubscribed = profile.accessLevels['YOUR_ACCESS_LEVEL']?.isActive;
if (isSubscribed) {
// Restore access to paid features
console.log('Access restored successfully!');
} else {
console.log('No active subscriptions found');
}
} catch (error) {
console.error('Failed to restore purchases:', error);
}
import { adapty } from '@adapty/capacitor';
try {
await adapty.identify({ customerUserId: "YOUR_USER_ID" });
// successfully identified
} catch (error) {
// handle the error
}
import { adapty } from '@adapty/capacitor';
const params = {
email: '[email protected]',
phoneNumber: '+18888888888',
firstName: 'John',
lastName: 'Appleseed',
gender: 'other',
birthday: new Date().toISOString(),
};
try {
await adapty.updateProfile(params);
console.log('Profile updated successfully');
} catch (error) {
console.error('Failed to update profile:', error);
}
import { adapty } from '@adapty/capacitor';
try {
await adapty.updateProfile({
codableCustomAttributes: {
key_1: 'value_1',
key_2: 2,
key_3: null, // to remove keys, pass null as their values
},
});
console.log('Custom attributes updated successfully');
} catch (error) {
console.error('Failed to update custom attributes:', error);
}
Adapty는 인디부터 대형 퍼블리셔까지 모든 단계의 앱을 지원합니다
앱 성장을 위한 모든 기능이 — 이미 Capacitor SDK에 포함되어 있습니다



노코드 페이월 빌더
개발팀 없이 iOS, Android, React Native, Flutter, FlutterFlow, KMP, Capacitor용 네이티브 페이월을 손쉽게 만드세요.
몇 분 만에 페이월 생성