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

注

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

ダッシュボードでデフォルトの支払い方法を管理する

API をアップグレードし、デフォルトとしてダッシュボードで支払い方法を管理します。

ページをコピー

2023 年 8 月 16 日に、Stripe は /v1/payment_intents および /v1/setup_intents API で作成した PaymentIntent と SetupIntent に適用されるデフォルトの支払い方法の選定プロセスを更新しました。

以前のバージョンの Stripe API では、作成リクエスト中に payment_method_types パラメーターを指定しなかった場合、Stripe は PaymentIntent と SetupIntent の両方にカードの支払い方法をデフォルトで使用していました。

これ以降、作成リクエストで payment_method_types パラメーターを指定しない場合、Stripe は PaymentIntent と SetupIntent に、ダッシュボードでお客様が管理している対象の支払い方法をデフォルトで適用します。

Payment methods

By default, Stripe enables cards and other common payment methods. You can turn individual payment methods on or off in the Stripe Dashboard. In Checkout, Stripe evaluates the currency and any restrictions, then dynamically presents the supported payment methods to the customer.

To see how your payment methods appear to customers, enter a transaction ID or set an order amount and currency in the Dashboard.

You can enable Apple Pay and Google Pay in your payment methods settings. By default, Apple Pay is enabled and Google Pay is disabled. However, in some cases Stripe filters them out even when they’re enabled. We filter Google Pay if you enable automatic tax without collecting a shipping address.

Checkout’s Stripe-hosted pages don’t need integration changes to enable Apple Pay or Google Pay. Stripe handles these payments the same way as other card payments.

決済フローを更新する

現在の Stripe の実装に合ったアップグレードパスを選択してください。

お客様のシステムで Card Element または個別の支払い方法の Element を使用している場合は、Payment Element に移行することをお勧めします。この統合型の導入により、一度に 25 種類以上の支払い方法を受け付けられるようになります。

PaymentIntent を作成する

このバージョンの API では、automatic_payment_methods.enabled パラメーターの指定は任意です。このパラメーターを指定しない場合、Stripe では true の値を想定し、デフォルトでこの機能が有効になるとみなされます。

Command Line
cURL
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d amount=1099 \ -d currency=usd

クライアント側での Stripe.js による確定

お客様のシステムが Stripe.js を使用し、confirmPayment または payment method で支払いを確定している場合、既存のプロセスは変わらず、これ以降の変更も必要ありません。

支払いを確定する場合は、return_url パラメーターを指定することをお勧めします。これにより、リダイレクトを必要とする支払い方法を受け付けることができます。

checkout.js
const form = document.getElementById('payment-form'); form.addEventListener('submit', async (event) => { event.preventDefault(); const {error} = await stripe.confirmPayment({ //`Elements` instance that was used to create the Payment Element elements, confirmParams: { return_url: 'https://example.com/return_url', }, }); if (error) { // This point will only be reached if there is an immediate error when // confirming the payment. Show error to your customer (for example, payment // details incomplete) const messageContainer = document.querySelector('#error-message'); messageContainer.textContent = error.message; } else { // Your customer will be redirected to your `return_url`. For some payment // methods like iDEAL, your customer will be redirected to an intermediate // site first to authorize the payment, then redirected to the `return_url`. } });

サーバー側での確定

サーバー側で確定する場合は、実装で return_url パラメーターを使用する必要があります。

Command Line
cURL
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d amount=1099 \ -d currency=usd \ -d confirm=true \ -d payment_method=
{{PAYMENT_METHOD_ID}}
\ --data-urlencode return_url="https://example.com/return_url"

または、automatic_payment_methods.allow_redirects パラメーターを never に設定して PaymentIntent または SetupIntent を作成できます。これにより確定時の return_url 要件は無効になります。引き続きダッシュボードから支払い方法を管理できますが、リダイレクトを必要とする支払い方法は対象外になります。

Command Line
cURL
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d amount=1099 \ -d currency=usd \ -d confirm=true \ -d payment_method=
{{PAYMENT_METHOD_ID}}
\ -d "automatic_payment_methods[enabled]"=true \ -d "automatic_payment_methods[allow_redirects]"=never

最後に、payment_method_types パラメーターを指定して PaymentIntent または SetupIntent を作成できます。これにより、確定時の return_url 要件も無効になります。このオプションでは、ダッシュボードから支払い方法を管理できません。

Command Line
cURL
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d amount=1099 \ -d currency=usd \ -d confirm=true \ -d payment_method=
{{PAYMENT_METHOD_ID}}
\ -d "payment_method_types[]"=card
このページはお役に立ちましたか。
はいいいえ
お困りのことがございましたら 、サポートにお問い合わせください。
早期アクセスプログラムにご参加ください。
変更ログをご覧ください。
ご不明な点がございましたら、お問い合わせください。
LLM ですか?llms.txt を読んでください。
Powered by Markdoc