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

注

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

Bancontact での支払い中に銀行詳細を保存する

Bancontact での支払いから顧客の IBAN 銀行詳細を保存する方法をご紹介します。

ページをコピー

注意

支払い中に支払いの詳細を保存するためのガイドに従うことをお勧めします。すでに Elements との連携が完了している場合は、Payment Element 移行ガイドをご覧ください。

SEPA ダイレクトデビット

Bancontact を使用せずに導入するには、SEPA ダイレクトデビットによる支払いの受け付けをご覧ください。

Bancontact はベルギーで普及している 1 回限りの使用の支払い方法であり、顧客は支払いの認証を求められます。Bancontact を使用して支払う場合、顧客はお客様のウェブサイトからリダイレクトされ、支払いをオーソリすると、ウェブサイトに戻されます。ここで、お客様は支払いが成功したか失敗したかについて即時の通知を受け取ります。

Bancontact を使用して、顧客の IBAN 銀行詳細を SEPA ダイレクトデビット PaymentMethod に保存できます。その後、SEPA ダイレクトデビット PaymentMethod を使用して、支払いを受け付けたり、サブスクリプションを設定したりできます。これにより、顧客が IBAN の入力を繰り返す必要がなくなるため、顧客の負担が軽減されます。また、確認済みの氏名と検証済みの IBAN を受け取ります。

注意

Bancontact を使用して SEPA ダイレクトデビットの支払いを設定するには、ダッシュボードで SEPA ダイレクトデビットを有効にする必要があります。また、Bancontact 利用規約および SEPA ダイレクトデビット利用規約に従う必要もあります。

Bancontact での支払いの受け付けは、支払いを追跡するための PaymentIntent (支払いインテント) オブジェクトの作成、支払い方法に関する情報と同意書承認の収集、および支払いを処理するための Stripe への送信で構成されます。Stripe は、PaymentIntent を使用して、支払いが完了するまでの支払いの状態のすべてを追跡して処理します。以降の支払いの作成には、最初の Bancontact PaymentIntent から収集された SEPA ダイレクトデビット PaymentMethod の ID が使用されます。

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'

Customer を作成する
サーバー側

お客様のビジネスで顧客がアカウントを作成する際に、Customer を作成し、それを、そのアカウントを表す独自の内部表記と関連付けます。このようにすると、保存されている支払い方法の詳細を後で取得して使用することができます。

Command Line
cURL
curl -X POST https://api.stripe.com/v1/customers \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"

PaymentIntent を作成する
サーバー側

サーバーで PaymentIntent を作成し、回収する amount、eur 通貨、顧客 ID を指定し、Setup future usage (今後の使用の設定) の引数として off_session を指定します。既存の Payment Intents のシステムがある場合は、bancontact を決済手段タイプ のリストに追加します。

Command Line
cURL
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d amount=1099 \ -d currency=eur \ -d "payment_method_types[]"=bancontact \ -d customer={{CUSTOMER_ID}} \ -d setup_future_usage=off_session

client secret を取得する

PaymentIntent には、client secret が含まれています。これは、支払いプロセスを安全に完了するためにクライアント側で使用されます。client secret をクライアント側に渡す際は、いくつかの方法を使用できます。

ブラウザーの fetch 関数を使用して、サーバーのエンドポイントから client secret を取得します。この方法は、クライアント側が 1 ページのアプリケーションで、特に React などの最新のフロントエンドフレームワークで構築されている場合に最適です。client secret を処理するサーバーのエンドポイントを作成します。

main.rb
Ruby
get '/secret' do intent = # ... Create or retrieve the PaymentIntent {client_secret: intent.client_secret}.to_json end

その後、クライアント側で JavaScript を使用して client secret を取得します。

(async () => { const response = await fetch('/secret'); const {client_secret: clientSecret} = await response.json(); // Render the form using the clientSecret })();

支払い方法の詳細と同意書承認を収集する
クライアント側

クライアントで支払いフォームを作成し、必要な請求先情報を顧客から収集します。

SEPA ダイレクトデビットの支払いを処理するには、顧客から同意書を収集する必要があります。以下に示す定型の承認用文書を表示し、顧客が黙示的にこの同意書に署名するようにしてください。

「Rocket Rides」はお客様の社名に置き換えます。

Authorization text template

By providing your payment information and confirming this payment, you authorise (A) and Stripe, our payment service provider, to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with those instructions. As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited. Your rights are explained in a statement that you can obtain from your bank. You agree to receive notifications for future debits up to 2 days before they occur.

コピー

支払い方法を設定するか、PaymentIntent を確定すると、承認済みの同意書が作成されます。顧客は黙示的に同意書に署名したため、フォームまたはメールを通じて、顧客にこれらの規約を伝える必要があります。

フィールド値
name顧客の氏名。
email顧客のメール。
checkout.html
<form id="payment-form"> <div class="form-row"> <label for="name"> Name </label> <input id="name" name="name" required> </div> <div class="form-row"> <label for="email"> Email </label> <input id="email" name="email" required> </div> <button id="submit-button">Pay with Bancontact</button> <!-- Display mandate acceptance text. --> <div id="mandate-acceptance"> By providing your payment information and confirming this payment, you authorise (A) Rocket Rides and Stripe, our payment service provider, to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with those instructions. As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited. Your rights are explained in a statement that you can obtain from your bank. You agree to receive notifications for future debits up to 2 days before they occur. </div> <!-- Used to display form errors. --> <div id="error-message" role="alert"></div> </form>

Stripe に支払いを送信する
クライアント側

PaymentIntent の client secret を使用し、クライアント側で支払いを作成します。client secret は、 Stripe API リクエストを認証する API キーとは異なります。client secret は支払いを完了できるため、慎重に取り扱う必要があります。ログに記録したり、URL に埋め込んだり、当該の顧客以外に公開したりしないでください。

stripe.confirmBancontactPayment を呼び出し、顧客を Bancontact のウェブサイトまたはアプリにリダイレクトして支払いを完了します。支払い完了後に顧客をリダイレクトする return_url を含めてください。また、顧客の氏名とメールアドレスを billing_details で指定する必要もあります。

client.js
var stripe = Stripe(
'pk_test_TYooMQauvdEDq54NiTphI7jx'
); var accountholderName = document.getElementById('name'); var accountholderEmail = document.getElementById('email'); // Redirects away from the client const {error} = await stripe.confirmBancontactPayment( '{{PAYMENT_INTENT_CLIENT_SECRET}}', { payment_method: { billing_details: { name: accountholderName.value, email: accountholderEmail.value, }, }, return_url: 'https://example.com/checkout/complete', } ); if (error) { // Inform the customer that there was an error. }

顧客が支払いを送信すると、Stripe は顧客を return_url にリダイレクトし、以下の URL クエリーパラメーターを含めます。返品ページでは、これらを使用して PaymentIntent のステータスを取得し、顧客に支払いステータスを表示できます。

return_url を指定する際に、返品ページで使用する独自のクエリパラメーターを追加することもできます。

パラメーター説明
payment_intentPaymentIntent の一意の識別子。
payment_intent_client_secretThe client secret of the PaymentIntent object. For subscription integrations, this client_secret is also exposed on the Invoice object through confirmation_secret

顧客が自社のサイトにリダイレクトされたら、payment_intent_client_secret を使用して PaymentIntent をクエリし、顧客に取引ステータスを表示できます。

後日 SEPA ダイレクトデビット PaymentMethod に請求する

顧客に再び請求する必要が生じたときは、新しい PaymentIntent を作成します。以前の PaymentIntent を 取得し、latest_charge フィールドを展開して payment_method_details 内の generated_sepa_debit ID を探すことで、SEPA ダイレクトデビットの支払い方法の ID を見つけます。

Command Line
cURL
curl -G https://api.stripe.com/v1/payment_intents/{{PAYMENT_INTENT_ID}} \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "expand[]"=latest_charge

SEPA ダイレクトデビットの決済手段 ID は、レスポンス内の payment_method_details にある generated_sepa_debit ID になります。

{ "latest_charge": { "payment_method_details": { "bancontact": { "bank_code": "VAPE", "bank_name": "VAN DE PUT & CO", "bics": "VAPEBE22", "iban_last4": "7061", "generated_sepa_debit": "pm_1GrddXGf98efjktuBIi3ag7aJQ", "preferred_language": "en", "verified_name": "Jenny Rosen" }, "type": "bancontact" }, }, "payment_method_options": { "bancontact": {}

SEPA ダイレクトデビットと顧客 ID を使用して PaymentIntent を作成します。

Command Line
cURL
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "payment_method_types[]"=sepa_debit \ -d amount=1099 \ -d currency=eur \ -d customer=
{{CUSTOMER_ID}}
\ -d payment_method={{SEPA_DEBIT_PAYMENT_METHOD_ID}} \ -d confirm=true

導入をテストする

payment_method.billing_details.emailを以下の値のいずれかに設定して PaymentMethod のステータスの移行をテストします。メールアドレスの先頭に独自のカスタムのテキストを含め、その後ろにアンダースコアを付けることができます。 たとえば、test_1_generatedSepaDebitIntentsFail@example.com は、PaymentIntent とともに使用された場合に常に失敗する、SEPA ダイレクトデビットの PaymentMethod です。

メールアドレス説明
generatedSepaDebitIntentsSucceed@example.comPaymentIntent のステータスは、processing から succeeded に移行します。
generatedSepaDebitIntentsSucceedDelayed@example.comThe PaymentIntent status transitions from processing to succeeded after at least three minutes.
generatedSepaDebitIntentsFail@example.comPaymentIntent のステータスは、processing から requires_payment_method に移行します。
generatedSepaDebitIntentsFailDelayed@example.comThe PaymentIntent status transitions from processing to requires_payment_method after at least three minutes.
generatedSepaDebitIntentsSucceedDisputed@example.comPaymentIntent のステータスは、processing から succeeded に移行しますが、すぐに不審請求の申請が作成されます。

オプション支払い後のイベントを処理する

オプションBancontact リダイレクトを手動で処理する

参照情報

  • SEPA ダイレクトデビット決済を受け付ける
  • EU での SEPA ダイレクトデビットによるサブスクリプションを設定する
このページはお役に立ちましたか。
はいいいえ
お困りのことがございましたら 、サポートにお問い合わせください。
早期アクセスプログラムにご参加ください。
変更ログをご覧ください。
ご不明な点がございましたら、お問い合わせください。
LLM ですか?llms.txt を読んでください。
Powered by Markdoc