メインコンテンツにスキップ
チュートリアル

CloudflareのCapacitorにおけるStripe Payments: 新しいAppleガイドライン

CapacitorアプリにStripe Payment Linksを実装する方法を学びます。デジタル商品の支払いを処理するには、Appleの新しいガイドラインに準拠するために、CapacitorアプリにStripe Payment Linksを実装する必要があります。新しいAppleガイドラインは2025年5月1日から有効になります。

マーティン・ドナディュー

マーティン・ドナディュー

コンテンツマーケター

CloudflareのCapacitorにおけるStripe Payments: 新しいAppleガイドライン

Capacitorアプリに基づく新しいAppleガイドラインに従ってStripe Payment Linksを実装する

2025年5月1日以降、AppleはEpic v. Apple裁判の判決に基づいてApp Store Reviewガイドラインを大幅に変更しました。これにより、アメリカのアプリ開発者はデジタル商品やサービスに対する外部の支払い方法へのリンクを許可され、Appleのインアプリ購入システムの代替を提供するようになりました。 Epic v. Apple裁判Epic v. Apple裁判

The Epic Battle That Changed Mobile Payments Forever

この歴史的勝負は、2020年8月に始まりました。Epic Gamesは、AppleのApp Storeの規則を無視し、Fortniteのユーザーに直接の支払い方法を提供しました。これにより、AppleはFortniteをApp Storeから削除し、EpicはAppleのiOSアプリの配布とインアプリ支払いに関する制御をめぐって訴訟を起こしました。

AppleのApp Storeの経済モデルは、2008年に始まって以来、基本的な財政モデルで運営されてきました。この決定は、AppleのApp Storeの経済モデルを根本的に変えました。

The Final Ruling - No More Appeals

この判決は、Appleがこの決定をさらに法律上の挑戦で覆すことができないため、特に重要です。Appleは2025年初頭に最高裁がこの上訴を却下したため、下級裁判所の判決は法律の基盤となりました。このため、開発者はAppleがこの決定を法律上の挑戦で覆すことができないことを信頼して、外部の支払い方法を実装できます。

Equal Treatment Guaranteed by Law

この判決は、Appleが外部の支払い方法を使用するアプリに差別することを禁じています。裁判所は、Appleが以下のことを禁止するようにしました:

  1. 外部決済方法を使用するアプリに追加の料金を請求したり、追加の要件を課したりすることはありません。
  2. AppleのIAPシステムを独自に使用するアプリにのみ優遇的な検索結果や特集を提供することはありません。
  3. Appleのシステムと比較して外部決済の経験を劣等化する技術的措置をとることはありません。
  4. 基本的な消費者情報を超える過度の開示要件を課すことはありません。

これらの明確な保護措置により、開発者はストライプまたは他の外部決済プロバイダーを実装することなく、Appleからの微妙な報復や差別から恐れる必要がなくなりました。平等な競争環境が確立され、Appleはアプリの支払い方法に関係なく、すべてのアプリを同等に扱う必要があります。

この判決は、Appleの壁のある庭園アプローチに対する最も重大な挑戦の1つであり、モバイルアプリのマonetizationの方法が大幅に変化する重要な転換点です。Appleの30%のコミッション (小規模企業の場合は15%) に苦労してきた開発者にとって、この判決は、利益マージンを高め、顧客体験をより制御できるパスを提供します。

ストライプを使用することによるAppleのインアプリ購入の利点

この変更の財務的影響は開発者にとって重大です:

  • 低コストの決済処理: Appleは通常、インアプリ購入に対して30%のコミッション (小規模企業の場合は15%) を請求し、ストライプの料金は約2.9% + $0.30あたり1回の取引です。この差は、収益マージンを大幅に増加させる可能性があります。

  • 迅速な支払い: Appleではお金を入手するのに45-90日待たなければなりません。ストライプでは、2-3営業日以内に銀行口座に支払いを入金します。

  • Simplified Refund Process: Appleの複雑な返金システムを通過するのではなく、ストライプのダッシュボードを通じて返金を直接処理することができます。

小規模の開発者やビジネスにとって、これらのコスト削減とキャッシュフロー改善はゲームチェンジャーです。

この記事では、Capacitor アプリでこれらの新しい規則を利用し、Appleの更新されたガイドラインに準拠するようにするために、ストライプのペイメントリンクを実装する方法を紹介します。 updated guidelines.

この実装は ストライプの公式ドキュメントのペイメントリンクに関するものに基づいています。Capacitor アプリ向けに特に適応されています。

Understanding the New Guidelines

App Store Reviewガイドラインの更新により、開発者はデジタル商品やサブスクリプションのための支払い処理をユーザーに外部サイトに誘導することが許可されました。これは現在、アメリカApp Storeでのみ適用されます。

理解するべき重要な点:

  1. アプリ内でデジタル商品に外部の支払いオプションをリンクできます
  2. この機能は、アメリカのApp Storeに配信されているアプリにのみ適用されます
  3. Appleの開示要件に従う必要があります
  4. すべての顧客サポートと返金処理の責任はあなたに残ります

技術的な実装について詳しく見ていきましょう

まず、Stripe ダッシュボードで支払いリンクを作成してください

  1. Stripe ダッシュボードの「支払いリンク」セクションに移動してください
  2. 「+新規」ボタンをクリックして新しい支払いリンクを作成してください
  3. 製品またはサブスクリプションの詳細を定義してください
  4. 「支払い後」の設定で、「確認ページを表示しない」に選択してください
  5. Universal リンクを成功 URL に設定してください (後で設定します)
  6. 「リンクを作成」ボタンをクリックして支払いリンクを生成してください

支払い完了後にアプリにユーザーをリダイレクトするには、Universal リンクを設定してください:

  1. Create an apple-app-site-association __CAPGO_KEEP_0__ ドメインにファイルを作成してください:
{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appIDs": ["YOURTEAMID.com.yourdomain.yourapp"],
        "components": [
          {
            "/": "/checkout_redirect*",
            "comment": "Matches any URL whose path starts with /checkout_redirect"
          }
        ]
      }
    ]
  }
}
  1. このファイルを https://yourdomain.com/.well-known/apple-app-site-association

  2. 正しい MIME タイプでサーブされていることを確認してください application/json

  3. Capacitor アプリを Universal リンクを処理できるように設定するには、適切な特権を追加してください。まず、 capacitor.config.ts:

import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  // Your existing app configuration (appId, appName, etc.)
  plugins: {
    Geolocation: {
      // Request precise location access on iOS
      iosLocationAccuracy: 'reduced'
    }
  }
};

export default config;
  1. Xcode プロジェクトに Associated Domains 特権を追加してください:
    • Xcode プロジェクトを開いてください
    • アプリのターゲットを選択してください
    • 「署名と機能」に移動する
    • 「+機能」ボタンをクリックし、「関連するドメイン」を選択する
    • 追加 applinks:yourdomain.com

ステップ 3: フォールバックページの作成

フォールバックページを作成して、インストールされていない場合のケースを処理するURLにリダイレクトする:

<!DOCTYPE html>
<html>
<head>
  <title>Redirecting...</title>
  <meta http-equiv="refresh" content="0;url=https://yourdomain.com/app-download">
</head>
<body>
  <p>Redirecting to download page...</p>
</body>
</html>

ステップ 4: Capacitor アプリに支払いボタンを実装する

アプリに支払いボタンを追加する:

import { Capacitor } from '@capacitor/core';

export async function openPaymentLink(userEmail, userId) {
  // Use your actual Stripe payment link
  const baseUrl = 'https://buy.stripe.com/your_payment_link';
  
  // Add URL parameters to customize the experience
  const params = new URLSearchParams({
    prefilled_email: encodeURIComponent(userEmail),
    client_reference_id: userId
  });

  const fullUrl = `${baseUrl}?${params.toString()}`;
  
  // Simple window.open works in both web and Capacitor
  // Using _blank opens in Safari on iOS which is important for users with saved Stripe Link credentials
  window.open(fullUrl, '_blank');
}

サファリの重要性:サファリ (via ) でアプリ内ブラウザではなく、支払いリンクを開くことで、ユーザーが以前ストリーピー・リンクで支払い情報を保存していた場合、自動的にクレジットカード情報が利用可能になります。これにより、ユーザーが再度クレジットカード情報を入力する必要がなくなるため、フリクションと放棄率が大幅に減り、チェックアウトの体験がスムーズになります。 window.openステップ 5: アプリでuniversalリンクを処理する

ステップ 6: __CAPGO_KEEP_0__ アプリのuniversalリンクを設定する

  1. First, App プラグインをインストールしてください:
npm install @capacitor/app
  1. App プラグインをアプリに登録してください:
import { App } from '@capacitor/app';

// In your initialization code
App.addListener('appUrlOpen', (event) => {
  // Example URL: https://yourdomain.com/checkout_redirect?session_id=cs_test_...
  const url = new URL(event.url);
  
  if (url.pathname.startsWith('/checkout_redirect')) {
    // Extract any parameters you need
    const params = new URLSearchParams(url.search);
    const sessionId = params.get('session_id');
    
    // Handle successful payment
    if (sessionId) {
      // Verify the payment on your server if needed
      verifyPayment(sessionId);
      
      // Update UI to reflect successful purchase
      updatePurchaseStatus(true);
    }
  }
});

async function verifyPayment(sessionId) {
  // Call your backend to verify the payment
  // This is optional if you're relying on webhooks
}

function updatePurchaseStatus(success) {
  // Update your app UI to reflect purchase status
}

ステップ 6: 注文処理の Webhook を設定する

最後に、成功した支払いを処理するために、サーバー上で Webhook を構成してください:

// Using Express.js as an example
const express = require('express');
const stripe = require('stripe')('sk_test_your_stripe_secret_key');
const app = express();

// Use raw body parser for webhook signature verification
app.post('/webhook', express.raw({type: 'application/json'}), async (req, res) => {
  const sig = req.headers['stripe-signature'];
  const webhookSecret = 'whsec_your_webhook_secret';
  
  let event;
  
  try {
    event = stripe.webhooks.constructEvent(req.body, sig, webhookSecret);
  } catch (err) {
    console.log(`Webhook Error: ${err.message}`);
    return res.status(400).send(`Webhook Error: ${err.message}`);
  }
  
  // Handle the checkout.session.completed event
  if (event.type === 'checkout.session.completed') {
    const session = event.data.object;
    
    // Retrieve client_reference_id (your user ID)
    const userId = session.client_reference_id;
    
    // Grant access to the purchased content
    await grantAccess(userId, session.id);
  }
  
  res.status(200).send();
});

async function grantAccess(userId, sessionId) {
  // Your logic to grant access to the purchased content
  // This could be updating a database, sending a notification, etc.
}

app.listen(3000, () => console.log('Webhook server running on port 3000'));

Android の互換性

Epic v. Apple 判決は、モバイル ペイメント ランドスケープを根本的に変えました。 iOS アプリに直接影響を与えるだけでなく、Android 開発者にとって外部の支払い方法を使用する立場を強化しました。

Android 開発者は、完全な自信を持って外部の支払いソリューションを実装できます。 Epic v. Apple 判決によって設定された先例は、開発者がさまざまなプラットフォームで外部の支払い方法を使用する際に潜在的な制限から守っています。この裁判によって、多くの Android 開発者が何年も前から行っていたことの有効性が証明されました - 低い手数料の代わりに代替の支払いオプションを提供すること。

Google Play Store は、Apple と比較して外部の支払い方法について常に制限が少なかったため、法律上の先例が確立された今、Stripe または他の外部の支払いプロバイダーを Android アプリに実装するリスクはほとんどありません。Stripe Payment Links のアプローチを使用することで、Android アプリを実装することができます。法律上の根拠が確立されているため、特別な披露ダイアログを必要とせずに同じアプローチを使用できます。

iOS の実装と同様に、Android デバイス用に実装したものはほぼ同じです。Google Play Store は、Apple と同様の制限を設けていません。したがって、Stripe Payment Links のアプローチを使用することで、特別な披露ダイアログを必要とせずに同じアプローチを使用できます。

デープ リンキング (iOS の Universal Links と同等の機能) を処理するには、次の手順を実行してください:

  1. App リンクを設定する AndroidManifest.xml __CAPGO_KEEP_0__でリダイレクト URLを処理する
  2. Capacitor .well-known/assetlinks.json __CAPGO_KEEP_0__のドメインにアプリの詳細を含むファイルを作成する
  3. 同じ appUrlOpen リスナー ロジックを使用して成功した支払いを処理する

The beauty of Capacitor is that once you’ve implemented the platform-specific configurations, the actual payment flow code remains the same across both platforms.

支払い UIを作成する

Vueで使用できる支払いボタン コンポーネントの例です。Capacitorアプリに追加できます。

<template>
  <div class="payment-container">
    <div class="pricing-card">
      <h2 class="mb-4 text-xl font-bold">{{ product.name }}</h2>
      <p class="mb-6 text-gray-600">{{ product.description }}</p>
      <div class="mb-6 price-tag">
        <span class="text-2xl font-bold">${{ product.price }}</span>
        <span v-if="product.isSubscription" class="text-sm text-gray-500">/month</span>
      </div>
      <button 
        @click="handlePayment" 
        class="py-3 w-full font-medium text-white bg-indigo-600 rounded-lg transition-colors hover:bg-indigo-700"
      >
        Purchase Now
      </button>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue';
import { Dialog } from '@capacitor/dialog';

const props = defineProps({
  product: {
    type: Object,
    required: true
  },
  userEmail: {
    type: String,
    default: ''
  },
  userId: {
    type: String,
    required: true
  }
});

const isLoading = ref(false);

async function showExternalPaymentDisclosure() {
  const { value } = await Dialog.confirm({
    title: 'Leaving App for Payment',
    message: 'You are about to leave this app to make a payment. Apple is not responsible for the privacy or security of payments that are not made through the App Store. All payment-related issues, including refunds, must be handled by our support team.',
    okButtonTitle: 'Continue',
    cancelButtonTitle: 'Cancel'
  });
  
  return value;
}

async function openPaymentLink() {
  // Use your actual Stripe payment link
  const baseUrl = 'https://buy.stripe.com/your_payment_link';
  
  // Add URL parameters to customize the experience
  const params = new URLSearchParams({
    prefilled_email: encodeURIComponent(props.userEmail),
    client_reference_id: props.userId
  });

  const fullUrl = `${baseUrl}?${params.toString()}`;
  
  // Simple window.open works in both web and Capacitor
  // Using _blank opens in Safari on iOS which is important for users with saved Stripe Link credentials
  window.open(fullUrl, '_blank');
}

async function handlePayment() {
  isLoading.value = true;
  try {
    // Only show the disclosure on iOS
    if (window.Capacitor?.getPlatform() === 'ios') {
      const userConfirmed = await showExternalPaymentDisclosure();
      if (!userConfirmed) return;
    }
    
    await openPaymentLink();
  } catch (error) {
    console.error('Payment error:', error);
    await Dialog.alert({
      title: 'Payment Error',
      message: 'There was an error initiating the payment. Please try again.'
    });
  } finally {
    isLoading.value = false;
  }
}
</script>

異なる地域を処理する

新しい Apple のガイドラインは、米国 App Store のアプリのみに適用されるため、ユーザーの地域を検出して適切な支払い方法を適用する戦略が必要になります。IP 地理位置を使用したより信頼できるアプローチを紹介します。

import { Capacitor } from '@capacitor/core';

async function determinePaymentMethod() {
  // Always use Stripe for Android
  if (Capacitor.getPlatform() !== 'ios') {
    return 'external';
  }
  
  try {
    // Use a geolocation service to determine user's country
    const response = await fetch('https://ipapi.co/json/');
    const locationData = await response.json();
    
    // Check if the user is in the United States
    if (locationData.country_code === 'US') {
      return 'external'; // Can use Stripe Payment Links
    } else {
      return 'iap'; // Must use In-App Purchases
    }
  } catch (error) {
    console.error('Error detecting region:', error);
    return 'iap'; // Default to IAP to be safe
  }
}

export async function processPayment(product, userEmail, userId) {
  const paymentMethod = await determinePaymentMethod();
  
  if (paymentMethod === 'external') {
    // Use Stripe Payment Links
    await initiateExternalPayment(userEmail, userId);
  } else {
    // Use Apple's In-App Purchase
    await initiateInAppPurchase(product.appleProductId);
  }
}

このアプローチでは、無料の ipapi.co __CAPGO_KEEP_0__のサービスを使用して、ユーザーのIPアドレスに基づいて、ユーザーの国を決定することができます。MaxMindなどの他の地理位置サービスも使用することができ、または、セキュリティの向上のために、サーバーサイドでこのチェックを実行することもできます。

注意:このアプローチは機能しますが、IP地理位置の精度は100%ではないことがよくあります。 mission-criticalアプリケーションでは、複数の検出方法を使用するか、ユーザーに地域を手動で選択させることを検討してください。

Capacitor プラグインを使用して、より正確な地理位置検出を行う

より正確な地理位置検出を行うには、@capgo/nativegeocoderと組み合わせて、Capacitor Geolocation プラグインを使用して、ユーザーの国をより高精度で決定することができます。

  1. 最初に必要なプラグインをインストールする必要があります。
npm install @capacitor/geolocation @capgo/nativegeocoder
  1. Capacitor プロジェクトでプラグインを設定します。次の内容をプロジェクトに追加してください。 capacitor.config.ts:
import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  // Your existing app configuration (appId, appName, etc.)
  plugins: {
    Geolocation: {
      // Request precise location access on iOS
      iosLocationAccuracy: 'reduced'
    }
  }
};

export default config;
  1. 地理位置に基づいて地域を検出する
import { Capacitor } from '@capacitor/core';
import { Geolocation } from '@capacitor/geolocation';
import { NativeGeocoder } from '@capgo/nativegeocoder';

async function isUserInUSA() {
  try {
    // Request permission first
    const permissionStatus = await Geolocation.requestPermissions();
    
    if (permissionStatus.location === 'granted') {
      // Get current position
      const position = await Geolocation.getCurrentPosition({
        timeout: 10000,
        enableHighAccuracy: false
      });
      
      // Use NativeGeocoder to reverse geocode the coordinates
      const results = await NativeGeocoder.reverseGeocode({
        latitude: position.coords.latitude,
        longitude: position.coords.longitude,
        useLocale: true,
        maxResults: 1
      });
      
      if (results.addresses.length > 0) {
        // Check if the user is in the USA
        return results.addresses[0].countryCode === 'US';
      }
    }
    
    // If we couldn't determine location or permission denied, fall back to IP detection
    return await isUserInUSAByIP();
  } catch (error) {
    console.error('Error detecting location:', error);
    // Fall back to IP detection on error
    return await isUserInUSAByIP();
  }
}

async function isUserInUSAByIP() {
  try {
    const response = await fetch('https://ipapi.co/json/');
    const data = await response.json();
    return data.country_code === 'US';
  } catch (error) {
    console.error('Error detecting IP location:', error);
    return false; // Default to false to be safe
  }
}

export async function determinePaymentMethod() {
  // Always use Stripe for Android
  if (Capacitor.getPlatform() !== 'ios') {
    return 'external';
  }
  
  // Check if user is in the USA
  const isUSA = await isUserInUSA();
  return isUSA ? 'external' : 'iap';
}

export async function processPayment(product, userEmail, userId) {
  const paymentMethod = await determinePaymentMethod();
  
  if (paymentMethod === 'external') {
    // Use Stripe Payment Links
    await initiateExternalPayment(userEmail, userId);
  } else {
    // Use Apple's In-App Purchase
    await initiateInAppPurchase(product.appleProductId);
  }
}

この実装では、ユーザーが物理的にアメリカにいるかどうかを決定するより正確な方法を提供します。まず、デバイスのGPSとネイティブジオコーダーを使用して、国を決定します。許可の問題やその他のエラーにより失敗した場合、IPベースの検出にフォールバックします。

必要な許可を追加することを忘れないでください。 info.plist (iOS)ファイル AndroidManifest.xml (Android)ファイル

For iOS (ios/App/App/Info.plist):

<key>NSLocationWhenInUseUsageDescription</key>
<string>We need your location to determine which payment method to use based on regional availability.</string>

For Android (android/app/src/main/AndroidManifest.xml):

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

このアプローチは、Apple の新しいガイドライン下で外部の支払いオプションに適格であるかどうかを決定する最も正確な方法を提供します。

サブスクリプションの管理

Stripe を使用することで、サブスクリプションを提供および管理する能力が得られます。Capacitor アプリでサブスクリプション管理を取り扱う方法はこちらです。

1. サブスクリプション管理ページの作成

__CAPGO_KEEP_0__ アプリにサブスクリプション管理ページを追加して、ユーザーの有効なサブスクリプションを表示します。

<template>
  <div class="subscription-manager">
    <div v-if="isLoading" class="loading-indicator">
      Loading subscription data...
    </div>
    
    <div v-else-if="subscription" class="subscription-info">
      <h2 class="mb-4 text-xl font-bold">Your Subscription</h2>
      
      <div class="mb-6 plan-details">
        <p><span class="font-medium">Plan:</span> {{ subscription.planName }}</p>
        <p><span class="font-medium">Status:</span> {{ subscription.status }}</p>
        <p><span class="font-medium">Renews:</span> {{ formatDate(subscription.currentPeriodEnd) }}</p>
      </div>
      
      <button 
        @click="manageSubscription" 
        class="py-3 w-full font-medium text-white bg-indigo-600 rounded-lg transition-colors hover:bg-indigo-700"
      >
        Manage Subscription
      </button>
    </div>
    
    <div v-else class="no-subscription">
      <p class="mb-4">You don't have an active subscription.</p>
      <button 
        @click="goToPricingPage" 
        class="py-3 w-full font-medium text-white bg-indigo-600 rounded-lg transition-colors hover:bg-indigo-700"
      >
        View Plans
      </button>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import { getUserSubscription } from '../services/subscription';

const subscription = ref(null);
const isLoading = ref(true);

onMounted(async () => {
  try {
    const userData = await getUserSubscription();
    subscription.value = userData.subscription;
  } catch (error) {
    console.error('Failed to load subscription:', error);
  } finally {
    isLoading.value = false;
  }
});

function formatDate(timestamp) {
  return new Date(timestamp * 1000).toLocaleDateString();
}

function manageSubscription() {
  // Open Stripe Customer Portal
  window.open(subscription.value.portalUrl, '_blank');
}

function goToPricingPage() {
  // Navigate to pricing page
  // router.push('/pricing');
}
</script>

2. サブスクリプション管理用のカスタマーポータル

Stripe は、ユーザーがサブスクリプションを管理できるカスタマーポータルを提供しています。このポータルへのリンクを作成するには、サーバーから実行してください。

// Server-side code (Node.js)
const stripe = require('stripe')('sk_your_stripe_secret_key');

async function createPortalSession(customerId) {
  const session = await stripe.billingPortal.sessions.create({
    customer: customerId,
    return_url: 'https://yourdomain.com/account',
  });
  
  return session.url;
}

App Store の規制に適合する

Apple の規制に適合するように実装するには、以下の点に注意してください。

  1. 適切な外部購入に関する説明を含める
  2. Appleの規定に従って、ユーザーがアプリを離れることを通知するモーダルシートを実装する
  3. アプリ内で購入された場合のAppleのコミッションを回避することはできない
  4. Appleはトランザクションの責任を負わないことをユーザーに明確に伝える

Appleの規定に従ってのディスコースルモーダルの実装例

import { Dialog } from '@capacitor/dialog';

async function showExternalPaymentDisclosure() {
  const { value } = await Dialog.confirm({
    title: 'Leaving App for Payment',
    message: 'You are about to leave this app to make a payment. Apple is not responsible for the privacy or security of payments that are not made through the App Store. All payment-related issues, including refunds, must be handled by our support team.',
    okButtonTitle: 'Continue',
    cancelButtonTitle: 'Cancel'
  });
  
  return value;
}

export async function initiateExternalPayment(userEmail, userId) {
  const userConfirmed = await showExternalPaymentDisclosure();
  
  if (userConfirmed) {
    await openPaymentLink(userEmail, userId);
  }
}

実装をテストする

実装をテストするには

  1. アプリ内で支払いボタンをクリックし、ディスコースルモーダルが表示され、ストライプの支払いページにリダイレクトされることを確認する
  2. ストライプのテストカードを使用してテスト支払いを完了する 4242 4242 4242 4242
  3. 支払い後、universal linkを介してアプリに戻されることを確認する
  4. ウェブフックがイベントを受信したことを確認する checkout.session.completed イベント

まとめ

iOSアプリでデジタルグッズに対する外部の支払いオプションを使用する能力は、開発者により多くの柔軟性を与える大きな変更です。この変更は現在、アメリカのApp Storeのアプリにのみ適用されますが、Appleのインアプリ購入システムへの代替として重要なものです。

CapacitorでStripe Payment Linksを使用することで、Appleのガイドラインに準拠しながら、迅速にストリーミングされたチェックアウトエクスペリエンスを実装できます。このアプローチでは、Appleのインアプリ購入システムよりも、ストリーミングの強力な支払インフラストラクチャ、低い処理手数料(3%対30%)、そして迅速な支払(月ではなく日)を利用できます。

Appleのエコシステム外で発生するこれらの取引を取り扱う必要があるため、すべての顧客サポートと返金問題を直接処理する必要があります。

CapacitorアプリでStripe Payment Linksを実装しましたか?コメント欄でご意見をご覧ください。

FAQ

Q: このアプローチはAppleのガイドラインに準拠していますか?
A: はい、2025年5月1日以降、Appleは、アメリカのApp Storeで配布されるアプリでデジタルグッズやサービスへのリンクを許可しています。ただし、必要な披露を含める必要があります。

Q: 外部の支払い方法を使用する場合、Appleのコミッションを支払う必要がありますか?
A: いいえ、新しい規則の1つの主な利点は、Appleのシステム外で処理される支払いに対してコミッションを支払う必要がないことです。

Q: この新しい規則を利用するには、会社がアメリカに本社を置く必要がありますか?
A: アメリカのApp Storeにアプリを公開し、購入するユーザーがアメリカにいる場合、世界中の企業が外部の支払い方法を実装できます。判決は、市場(アメリカのApp Store)とユーザーの位置、企業の位置とは関係ありません。つまり、ヨーロッパ、アジア、南アメリカ、またはどこからでも開発者がStripe Payment Linksを実装できます。

Q: アメリカ外のユーザーが外部の支払いオプションを使用しようとした場合に何が起こるのですか?
A: ユーザーがアメリカにいるかどうかを検出する(記事で示されているように)ことで、外部の支払いオプションをアメリカのユーザーにのみ提示し、他の地域ではAppleのインアプリ購入システムを使用するようにする必要があります。

Q: 物理商品やアプリ外で消費されるサービスに使用できますか?
A: はい、アップルはいつも物理商品やアプリ外で消費されるサービス(乗り物のシェアリングや食事の配達など)に外部の支払い方法を使用することを許可しています。

Capacitor アプリのためのリアルタイム更新

ウェブ層のバグが生じた場合、Capgo を使用して修正を配信し、アプリストアの承認待ちの日数を待たずに。ユーザーはバックグラウンドで更新を受け取り、ネイティブの変更は通常のレビュー経路で残る

スタートする

最新のブログ

Capgoは、プロフェッショナルなモバイルアプリを作成するために必要な最良の洞察を提供します。