コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
売上
プラットフォームおよびマーケットプレイス
資金管理
開発者向けのツール
概要
バージョン管理
変更ログ
    概要
    Basil
    Acacia
    以前のバージョン
API バージョンのアップグレード
SDK バージョンをアップグレードする
開発者向けのツール
SDK
API
テスト
ワークベンチ
イベントの送信先
ワークフロー
Stripe CLI
Stripe Shell
開発者ダッシュボード
エージェントツールキット
LLM を使用した構築Visual Studio Code をご利用の場合Stripe 健全性アラートファイルのアップロード
セキュリティとプライバシー
セキュリティ
プライバシー
Stripe を拡張する
Stripe Apps
Stripe のコネクター
パートナー
Partner Ecosystem
パートナー認定
ホーム開発者向けのツールChangelogBasil2025-03-31.basil

注

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

サブスクリプションモードの Checkout Sessions のバグを修正し遅延率を改善対応が必要な変更点

新規情報

このバージョンでは、顧客がセッションを確認したときを含め、サブスクリプションモードセッションのすべての Checkout Session API の遅延率が改善されています。

また、請求先住所を更新できないなど、顧客が最初の支払い試行後にセッションを更新できなかった以前のバージョンのバグも修正されています。更新の代わりに、顧客自らブロックを解除できるようになりました。

対応処理が必要な変更である理由

この変更により、ユーザーが支払いを完了した_後に_サブスクリプションが作成されるようになるため、Checkout セッションが完全に完了するまで payment_intent は請求書を参照しません。つまり、請求書が作成される前には、checkout_session.status プロパティが complete でなければなりません。

システムが現在、支払いインテントの Webhook の請求書に依存している場合は、代わりに checkout_session.completed Webhook を使用するようにシステムを更新して、請求書を表示させることをお勧めします。

影響

  • サブスクリプションは、ユーザーが支払いを完了した後に作成されるようになりました。
  • 支払いの試行が失敗したときに、請求書が確定しているにもかかわらずサブスクリプションが未完了になる問題はなくなりました。
  • 請求書は、Checkout セッションのステータスが complete になるまで表示されません。
Ruby
require 'json' # Using Sinatra post '/webhook' do payload = request.body.read event = nil begin event = Stripe::Event.construct_from( JSON.parse(payload, symbolize_names: true) ) rescue JSON::ParserError => e # Invalid payload status 400 return end # Handle the event case event.type when 'payment_intent.succeeded' payment_intent = event.data.object # contains a Stripe::PaymentIntent # The subscription and invoice might not have been created at this stage. # Then define and call a method to handle the successful payment intent. # handle_payment_intent_succeeded(payment_intent) when 'checkout_session.completed' checkout_session = event.data.object # contains a Stripe::CheckoutSession # checkout_session.payment_intent is a string here, # but you can use this payment_intent token to fetch the associated invoice payment # through the /v1/invoice_payments API method and its guaranteed associated invoice # and invoice payment are non-null at this stage. # Then define and call a method to handle the successful completion of a Checkout Session # handle_checkout_session_completed(checkout_session) # ... handle other event types else puts "Unhandled event type: #{event.type}" end status 200 end

Upgrade

  1. View your current API version in Workbench.
  2. If you use an SDK, upgrade to the corresponding SDK version for this API version.
    • If you don’t use an SDK, update your API requests to include Stripe-Version: 2025-03-31.basil
  3. Upgrade the API version used for webhook endpoints.
  4. Test your integration against the new version.
  5. If you use Connect, test your Connect integration.
  6. In Workbench, perform the upgrade. You can roll back the version for 72 hours.

Learn more about Stripe API upgrades.

関連する変更点

  • Checkout Session が配送情報を削除
  • Checkout Session で配送オプションの更新が可能に
  • Checkout Sessions に permissions パラメーターを追加
  • Checkout セッションと Payment Links にオプション項目を追加しました
このページはお役に立ちましたか。
はいいいえ
お困りのことがございましたら 、サポートにお問い合わせください。
早期アクセスプログラムにご参加ください。
変更ログをご覧ください。
ご不明な点がございましたら、お問い合わせください。
LLM ですか?llms.txt を読んでください。
Powered by Markdoc