AI チャットで Stripe を接続し、ライブ API キーを追加した後、アプリで実際の決済フローを設定する準備ができました。各フローは、ログインした人を Stripe Checkout に送り、成功ページで Webhook だけに頼るのではなく、彼らがまだログインしている間に支払いを確認してアカウントを更新する必要があります。以下の AI チャットの例プロンプトを使用して、販売したいものとアプリが支払い後に誰かのアクセスをどのように変更すべきかに一致するように詳細を調整してください。そのままコピーするか、アプリに何をさせたいかを正確に記述するように調整できます。
チャットに入力する内容:
I want to let my users buy credits in my app using Stripe.
After a successful payment, the user should be returned to my app and their credits should be added to their account.
Verify the payment securely before adding credits.
Add the correct number of credits to the user’s account.
Make sure credits are only added once, even if the page is refreshed.
オプションのフォローアップ:
Add a “Buy 10 Credits” button to my homepage.
デジタル商品を販売する(電子書籍、オンラインコース、デジタルアートなど)
ユーザーがダウンロード可能なアイテムを購入し、支払い後にアクセスをアンロックできるようにします。
チャットに入力する内容:
I want to sell a digital product in my app using Stripe (for example, an eBook or course).
After a successful payment, the user should be returned to my app and get access to the download or content.
Record the purchase in my app.
Unlock the user’s access to the product.
Make sure the same payment can’t be used to unlock the product multiple times.
サービスを予約する(ヨガ、コーチングなど)
ユーザーが時間枠を予約するために支払い、予約をアカウントに保存できるようにします。
チャットに入力する内容:
I want to let my users book a paid service in my app using Stripe (for example, a yoga session or coaching call).
Let my users choose a service and time slot.
Handle the payment with Stripe.
After a successful payment, save the booking (service, time, user) to a bookings collection.
Show a clear confirmation in the app.
Prevent double‑booking, even if the user refreshes the page or retries the confirmation.
サブスクリプションを開始する
ユーザーが定期プランにサインアップできるようにし、登録済みとしてタグ付けします。
チャットに入力する内容:
Build a Stripe subscription flow where my users can sign up for a recurring plan.
Let my users choose a subscription plan in my app.
Handle the recurring payment with Stripe.
After a successful signup, mark the user as “Pro” (or subscribed) in their account.
Store the subscription details so I can manage cancellations or billing updates later.
サブスクリプションをキャンセルする
ユーザーがプランをキャンセルし、アクセスレベルを下げられるようにします。
チャットに入力する内容:Create a cancellation flow for subscriptions.
Let my users cancel their subscription, either from a page in my app or via the Stripe customer portal.
After a cancellation, update the user’s account so they lose their “Pro” / subscribed status.
Optionally, show a clear message or redirect them to a downgraded page or plan.
返金を発行してアクセスを取り消す
返金が処理された場合、クレジットを削除するかコンテンツアクセスをブロックします。
チャットに入力する内容:
Set up a secure flow to handle Stripe refunds.
When a refund is processed, let an admin trigger a check from inside the app.
Verify that the refunded payment belongs to the correct user.
Revoke access or subtract credits from that user’s account.
Prevent the same refund from being processed more than once.
オプションのフォローアップ:
Create an admin page where I can enter a Stripe payment or session ID, review the details, and apply the refund-related changes (like removing access or credits) manually.
イベントのチケットを販売する
ユーザーが一回限りのイベントのチケットを購入し、登録を保存できるようにします。
チャットに入力する内容:
I want to sell tickets for an event in my app using Stripe.
Let my users buy a ticket for a specific event.
After a successful payment, save the attendee’s details (name, email, event) in an attendees list or collection.
Show a clear confirmation or thank-you page after purchase.
Optionally, generate a simple ticket or confirmation code the attendee can use at the event.
チップや寄付を受け付ける
ユーザーが一回限りまたは月額の支払いで作業やプロジェクトをサポートできるようにします。
チャットに入力する内容:
Create a flow to accept donations or tips in my app using Stripe.
Let my users choose a suggested amount (for example, 5,10, $25) or enter a custom amount.
Handle the payment with Stripe.
After a successful payment, show a thank-you page or message.
Optionally, save each donation in a Donations collection linked to the user’s account.
オプションのフォローアップ:
Add a “Support Me” button to my About page that takes users into this donation flow.
国際決済を受け付ける
ユーザーがローカル通貨または方法を使って他の国から支払いできるようにします。
チャットに入力する内容:
Set up my Stripe payments so they work well for international users.
Enable common international payment methods (for example, iDEAL, Bancontact, Apple Pay, Google Pay).
Use Stripe’s automatic currency conversion so my users can pay in their local currency.
Show prices in USD in my app, but let Stripe handle local pricing at checkout.
Make sure the checkout flow works smoothly for users in different countries.
まだ原因が見つからない場合は、コンソールまたは関数ログからのエラーメッセージをコピーして、Base44 AI チャットに貼り付けてください。“help troubleshoot this payment flow step by step” を依頼し、プロバイダーとセットアップの詳細を含めてください。