3行で Stripe Billingの「クレジットカード払い」で発生する支払いエラーへの対応について書きます この記事では、支払いエラーを「予防・検知・解消」の3つに分けて説明します 支払いエラーは、Stripe Webhook、Firebase Cloud Functions、Stripeのスマートリトライ機能を使うと安全に処理できます 支払いエラーの対応を3つに分ける 私は今年の9月に月額課金をもつサービスをリリースしました1。 そこで発生するクレジットカードの支払いエラーは、残高不足、カードの有効期限切れなど理由は様々です。 しかし、支払いエラーの理由はあまり重要ではありません。 エラーが発生しても、お客様のカードや口座情報の詳細を知るのは、セキュリティ的に難しいからです2。 ほぼ全てのケースでカードの所有者本人に原因を確認してもらう作業が必要で、「決済が失敗した理由は、当社では分か