コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
財務の自動化
プラットフォームおよびマーケットプレイス
資金管理
開発者向けのツール
始める
支払い
財務の自動化
始める
支払い
財務の自動化
プラットフォームおよびマーケットプレイス
資金管理
概要
Stripe Payments について
構築済みのシステムをアップグレード
支払いの分析
オンライン決済
概要ユースケースを見つけるManaged Payments
Payment Links を使用する
決済ページを構築
高度なシステムを構築
アプリ内実装を構築
決済手段
決済手段を追加
    概要
    支払い方法の導入オプション
    ダッシュボードで支払い方法を管理
    決済手段のタイプ
    カード
    Stripe 残高で支払う
    銀行口座引き落とし
    銀行へのリダイレクト
    銀行振込
    クレジットトランスファー (Sources)
    後払い
    リアルタイム決済
    店舗支払い
    ウォレット
      Alipay
      Amazon Pay
        決済を受け付ける
        将来の支払いを設定する
      Apple Pay
      Cash App Pay
      Google Pay
      GrabPay
      Link
      MB WAY
      MobilePay
      PayPal
      PayPay
      Revolut Pay
      Satispay
      Secure Remote Commerce
      Vipps
      WeChat Pay
    国ごとに現地の支払い方法を有効化
    カスタムの決済手段
決済手段を管理
Link による購入の迅速化
支払いインターフェイス
Payment Links
Checkout
Web Elements
アプリ内 Elements
決済シナリオ
カスタムの決済フロー
柔軟なアクワイアリング
オーケストレーション
店頭支払い
端末
他の Stripe プロダクト
Financial Connections
仮想通貨
Climate
ホーム支払いAdd payment methodsWalletsAmazon Pay

注

このページはまだ日本語ではご利用いただけません。より多くの言語で文書が閲覧できるように現在取り組んでいます。準備が整い次第、翻訳版を提供いたしますので、もう少しお待ちください。

将来の Amazon Pay による支払いを設定する

Amazon Pay の詳細を保存し、後で顧客に請求する方法をご紹介します。

ページをコピー

This guide describes how to save Amazon Pay payment details using Checkout, our fully hosted checkout page.

Learn how to set up a subscription with Amazon Pay to create recurring payments after saving a payment method in Checkout.

Stripe を設定する
サーバー側

まず、Stripe アカウントが必要です。今すぐ登録してください。

アプリケーションから Stripe API にアクセスするには、Stripe の公式ライブラリを使用します。

Command Line
Ruby
# Available as a gem sudo gem install stripe
Gemfile
Ruby
# If you use bundler, you can add this line to your Gemfile gem 'stripe'

支払い方法を保存する許可を得る
サーバー側

将来の使用に備えて顧客の支払い方法を保存する場合は、顧客の許可を得る必要があります。あらかじめ契約 (同意書とも呼ばれます) を作成しておくことで、顧客の支払い情報を保存し、顧客がウェブサイトやアプリを能動的に使用していないときでも請求できるようになります。

顧客の支払い方法の保存をどのように計画しているかを示す規約をウェブサイトやアプリに追加し、顧客が許可できるようにします。顧客がオフラインのときに請求する予定である場合は、規約に以下の内容も含める必要があります。

  • 指定された取引で顧客の代理として単独の支払いまたは一連の支払いを開始するための顧客の許可
  • 予測される支払い頻度 (1 回限り、継続支払い) とタイミング
  • 支払い金額の決定方法
  • サブスクリプションサービスに使用される支払い方法を設定する場合は、キャンセルに関するポリシー。

これらの規約に関する顧客の書面による同意の記録を必ず保管してください。

Customer の作成または取得
サーバー側

今後の支払いで Amazon Pay 支払い方法を再利用できるようにするには、これを Customer に関連付けます。

Create a Customer object when your customer creates an account with your business, and associate the ID of the Customer object with your own internal representation of that customer. Alternatively, you can create a new Customer before saving a payment method for future payments.

新しい Customer を作成するか、または既存の Customer を取得して、この決済に関連付けます。サーバーに以下のコードを含め、新しい Customer を作成します。

Command Line
cURL
curl https://api.stripe.com/v1/customers \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ --data-urlencode description="My First Test Customer (created for API docs)"

Checkout セッションを作成する
サーバー側

Your customer must authorize you to use their Amazon account for future payments through Stripe Checkout. This allows you to accept Amazon payments. Add a checkout button to your website that calls a server-side endpoint to create a Checkout Session.

index.html
<html> <head> <title>Checkout</title> </head> <body> <form action="/create-checkout-session" method="POST"> <button type="submit">Checkout</button> </form> </body> </html>

Create a Checkout Session in setup mode to collect the required information. After creating the Checkout Session, redirect your customer to the URL that the response returns.

Ruby
Stripe::Checkout::Session.create({ mode: 'setup', payment_method_types: ['card'], payment_method_types: ['card', 'amazon_pay'], customer: customer.id, success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', })

実装内容をテストする

支払い方法として Amazon Pay を選択してから、Continue to Amazon Pay (Amazon Pay に進む) をクリックします。リダイレクトページで SetupIntent を認証することで、設定の成功ケースをテストできます。SetupIntent のステータスが requires_action から succeeded に移行します。

このページはお役に立ちましたか。
はいいいえ
お困りのことがございましたら 、サポートにお問い合わせください。
早期アクセスプログラムにご参加ください。
変更ログをご覧ください。
ご不明な点がございましたら、お問い合わせください。
LLM ですか?llms.txt を読んでください。
Powered by Markdoc