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

注

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

Multibanco による決算を受け付ける

Multibanco による支払い方法を受け付ける方法をご紹介します。

注意

サーバー側での手動確定を使用する必要がある場合、またはお使いの実装で決済手段を別途表示する必要がある場合を除き、決済を受け付けるガイドに従うことをお勧めします。すでに Elements との連携が完了している場合は、Payment Element 移行ガイドをご覧ください。

Multibanco は、ポルトガルにおける店舗支払いに基づく決済手段です。ビジネスがヨーロッパまたはアメリカを拠点にしている場合、Payment Intents API を使用して、ポルトガルの顧客から Multibanco による決済を受け付けることができます。

取引を完了するために、顧客は Multibanco の法人番号と参照番号が記載された支払い票を受け取ります。顧客はこれらの店舗支払いの詳細を使用して、オンラインバンキングまたは ATM での決済フロー以外の支払いを行います。

顧客が Multibanco の取引詳細に応じて支払いを行う際、銀行振込が開始されるため、支払いの確定が数日遅れる場合があります。銀行振込は特に週末に遅延が発生することがあります。これは支払い確定の遅延の一因になります。

Stripe を設定する
サーバ側
クライアント側

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

サーバ側

この組み込みには、サーバ上に Stripe API と通信するエンドポイントが必要です。サーバから 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'

クライアント側

Stripe iOS SDK はオープンソースです。詳細なドキュメントが提供されており、iOS 13 以降をサポートするアプリと互換性があります。

SDK をインストールするには、以下のステップに従います。

  1. In Xcode, select File > Add Package Dependencies… and enter https://github.com/stripe/stripe-ios-spm as the repository URL.
  2. リリースページから最新のバージョン番号を選択します。
  3. StripePaymentsUI 製品をアプリのターゲットに追加します。

注

For details on the latest SDK release and past versions, see the Releases page on GitHub. To receive notifications when a new release is published, watch releases for the repository.

アプリの起動時に Stripe 公開可能キーを使用して SDK を設定します。これにより、アプリが Stripe API にリクエストを送信できるようになります。

AppDelegate.swift
Swift
import UIKit import StripePaymentsUI @main class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { StripeAPI.defaultPublishableKey =
"pk_test_TYooMQauvdEDq54NiTphI7jx"
// do any other necessary launch configuration return true } }

注

Use your test keys while you test and develop, and your live mode keys when you publish your app.

PaymentIntent を作成する
サーバー側
クライアント側

Stripe uses a PaymentIntent object to represent your intent to collect payment from a customer, tracking state changes from Multibanco voucher creation to payment completion.

サーバー側

Create a PaymentIntent on your server with an amount and the eur currency (Multibanco doesn’t support other currencies). If you already have an integration using the Payment Intents API, add multibanco to the list of payment method types for your PaymentIntent.

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[]"=multibanco

返される PaymentIntent には client secret が含まれ、これは PaymentIntent の確定に使用されます。次のステップで使用できるように、クライアントに client secret を送り返します。

クライアント側

クライアント側で、サーバーの PaymentIntent をリクエストし、その client secret を保存します。

CheckoutViewController.swift
Swift
サンプル全体を表示
class CheckoutViewController: UIViewController { var paymentIntentClientSecret: String? // ...continued from previous step override func viewDidLoad() { // ...continued from previous step startCheckout() } func startCheckout() { // Request a PaymentIntent from your server and store its client secret // Click View full sample to see a complete implementation } }

支払い方法の詳細を収集する
クライアント側

アプリでは、以下の必要な請求先情報を顧客から収集します。請求先情報を使用して STPPaymentIntentParams を作成します。

フィールド値
email顧客のメールアドレス。
Swift
let billingDetails = STPPaymentMethodBillingDetails() billingDetails.email = "jenny@example.com"

Stripe への支払いの送信
クライアント側

Submit the customer’s billing details by calling STPPaymentHandler confirmPayment with the client secret of the PaymentIntent object that you created. This presents a webview to display the Multibanco voucher. Afterwards, the completion block is called with the result of the payment.

Swift
let paymentIntentParams = STPPaymentIntentParams(clientSecret: paymentIntentClientSecret) let multibancoParams = STPPaymentMethodMultibancoParams(); paymentIntentParams.paymentMethodParams = STPPaymentMethodParams( multibanco: multibancoParams, billingDetails: billingDetails, metadata: nil ) STPPaymentHandler.shared().confirmPayment(paymentIntentParams, with: self) { (handlerStatus, paymentIntent, error) in switch handlerStatus { case .succeeded: // The Multibanco voucher was displayed successfully. The customer can now pay the Multibanco voucher case .canceled: // Handle cancelation case .failed: // Handle failure @unknown default: fatalError() } }

Stripe sends a payment_intent.requires_action event when a Multibanco voucher is created successfully. If you need to send an email with the voucher’s payment instructions link, you can locate the hosted_voucher_url at payment_intent.next_action.multibanco_display_details.hosted_voucher_url.

オプションSend automated payment instruction emails

オプションCustomize voucher appearance

支払い後のイベントを処理する
サーバー側

Multibanco is a delayed notification payment method. A customer pays for a Multibanco voucher outside your checkout flow through online banking or from an ATM.

After a Multibanco payment completes, Stripe sends a payment_intent.succeeded event. Use the Dashboard or build a webhook handler to receive these events and run actions, such as sending an order confirmation email to your customer, logging the sale in a database, or initiating a shipping workflow.

Learn about Multibanco expiration.

イベント説明次のステップ
payment_intent.requires_actionMultibanco の支払い票が正常に作成されました。顧客が Multibanco で支払うのを待ちます。
payment_intent.processing顧客は Multibanco で支払いができなくなりました。開始された決済の成功または失敗の結果を待ちます。
payment_intent.succeeded顧客は Multibanco で支払いました。顧客が購入した商品またはサービスのフルフィルメントを行います。
payment_intent.payment_failed顧客は Multibanco で支払いませんでした。顧客にメールまたはプッシュ通知で連絡し、別の支払い方法をリクエストします。

イベントを受信して、ビジネスアクションを実行する

手動

Stripe ダッシュボードを使用して、Stripe のすべての支払いの確認、メールによる領収書の送信、入金処理、失敗した支払いの再試行を行います。

ダッシュボードでテスト支払いを確認します。

カスタムコード

Webhook ハンドラを構築してイベントをリッスンし、非同期型のカスタムの決済フローを作成します。Stripe CLI を使用して、ローカルで Webhook の実装のテストとデバッグを行います。

Learn how to build a custom webhook.

実装をテストする

In a sandbox, set STPPaymentMethodBillingDetails email to the following values when you call STPPaymentHandler confirmPayment to test different scenarios.

メール説明

{any_prefix}@{any_domain}

Simulates a Multibanco voucher that a customer pays. The payment_intent.succeeded webhook arrives after about 3 minutes.

例: jenny#example.com

{any_prefix}succeed_immediately@{any_domain}

Simulates a Multibanco voucher that a customer pays immediately. The payment_intent.succeeded webhook arrives within several seconds.

例: succeed_immediately@example.com

{any_prefix}expire_immediately@{any_domain}

Simulates a Multibanco voucher that expires immediately. The payment_intent.payment_failed webhook arrives within several seconds.

例: expire_immediately@example.com

{any_prefix}expire_with_delay@{any_domain}

Simulates a Multibanco voucher that expires before a customer pays. The payment_intent.payment_failed webhook arrives after about 3 minutes.

例: expire_with_delay@example.com

{any_prefix}fill_never@{any_domain}

Simulates a Multibanco voucher that never succeeds. The payment_intent.payment_failed webhook arrives after 11 days, which mimics behavior in live mode. Learn about Multibanco expiration.

例: fill_never@example.com

有効期限

Multibanco vouchers expire at the expires_at UNIX timestamp in next_action.multibanco_display_details.expires_at, which is 7 days after you create the voucher. Customers can’t pay a Multibanco voucher after it expires. After expiration, the PaymentIntent’s status transitions from requires_action to processing, and Stripe sends a payment_intent.processing event.

The PaymentIntent remains in the processing status for a maximum buffer period of 4 days to allow for potential completed payment notification delays caused by bank-transfer delays. If the Multibanco payment doesn’t complete within the buffer period, the PaymentIntent’s status transitions to requires_payment_method and Stripe sends a payment_intent.payment_failed event. If you receive the customer’s funds after the buffer period, Stripe automatically initiates a refund process for the mispaid amount.

キャンセル

You can cancel Multibanco vouchers using Cancel a PaymentIntent. After cancelation, Stripe sends a payment_intent.canceled event.

If a customer’s funds are received for a canceled Multibanco voucher, Stripe automatically initiates a refund process for the mispaid amount.

注

Canceling a pending payment invalidates the original voucher instructions. When you cancel a pending Multibanco payment, inform your customer.

When you successfully reconfirm a PaymentIntent in status requires_action, Stripe creates new voucher instructions and a new hosted_voucher_url. You must provide them to your customer.

返金

Learn about Multibanco refunds.

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