Jacob Hyde
Jacob Hyde

Reputation: 1000

Manually trigger a Stripe subscription webhook

I cannot find the answer to this question that I once found. Basically I was able to create a stripe subscription using Laravel Cashier, and then trigger via code the subscription to be billed again, so I could test my invoice succeeded webhook. I am using Laravel Cashier. I recall I used ngrok to proxy, so I could get my webhook to work.

Basically it is recharging an active subscription. Any help would be great. PHP preferably.

Upvotes: 0

Views: 1288

Answers (1)

koopajah
koopajah

Reputation: 25622

The best option for now is to create a Subscription with a short trial period of a few minutes using the trial_end parameter. This lets you create a Subscription that will renew a few minutes later to simulate a new period that is starting.

There is no way to "fast forward time" or similar to go through multiple cycles in a few minutes otherwise.

As for webhooks the best option is to use Stripe's CLI: https://stripe.com/docs/stripe-cli

Upvotes: 0

Related Questions