Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
Testing Stripe's trial_will_end webhook

I'm in a bit of a pickle

I want to create a webhook listener to Stripe's customer.subscription.trial_will_end event to send a customer an email letting them know billing will start and giving them cancellation info, but I can't work out how to test it works without waiting a day between each test, i.e. setting the trial period for 4 days, and the event being fired when there's 3 days left.

The Stripe docs give a method for testing trials, but this doesn't fit my use case as the only thing that doesn't work using that method is the trial_will_end event. The CLI can send webhook events, but again the trial_will_end event is not implemented.

How can I test this functionality without having to wait a full day between tests?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

There are not currently great ways to manage time-dependent events like this. You will need to seed some test data to generate such events. For a given day of testing through, you can re-use a recent trial_will_end event (say evt_123) using the CLI resend function (doc):

stripe events resend evt_123 --webhook-endpoint we_321

This will let you re-test your endpoint to handle the event & send the email multiple times, ingesting the same event.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!