LoginSignup
2
0

More than 1 year has passed since last update.

#Stripe でサブスクリプション(定期支払い)の請求リトライ、請求の最後のリトライをテストしたい

Last updated at Posted at 2019-12-26

手順

設定ページのカスタムのリトライスケジュールで、請求リトライ回数を一回だけ、1日後にしておく

1日の間隔でのプランを作成しておく

定期支払いを作成する

顧客のカードを削除するなりして、次の請求サイクルの支払いが失敗するようにしておく

1日待つ

請求が失敗する

もう1日待つ

請求のリトライが起こり、失敗し、最後の請求リトライとなる

確認

イベントやwebhookリクエストの中身を見ると、次の値が見つかり、これが最後の請求リトライであることがわかる

"next_payment_attempt": null

{
  "id": "evt_xxxxxxxxxxxxxxxxxxx",
  "object": "event",
  "api_version": "yyyy-mm-dd",
  "created": **********,
  "data": {
    "object": {
...
      "next_payment_attempt": null,`

設定

image

Original by Github issue

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0