Trist
Trist

Reputation: 1366

Stripe Payments - Pay Nothing for 30 Days

I want to create a payment that takes nothing for the first 30 days, then takes one payment. As I understand it I create a subscription payment plan (setting the trial payment option to 30 days) and subscribe customers to this plan.

When the 30 days are up the Stripe will take a payment and issue a customer.subscription.updated webhook.

Can I setup a plan in Stripe to only take one payment or do I have to cancel the plan when I receive payment?

Upvotes: 0

Views: 309

Answers (1)

Derek Kurth
Derek Kurth

Reputation: 1898

Stripe does not handle this payment model for you, but there are a couple of ways you can do it:

  1. Like you said, just listen for the customer.subscription.updated event (or invoice.payment_succeeded) and cancel the plan when the trial period ends.
  2. Or, at the time you collect the user's credit card info, you can create the customer and Stripe and save the card. Then set up a scheduled task (cron job or something) to run daily and see which customers are due to pay on that day. Then charge the saved card for customers as they come due.

Both options have pros and cons. Since your pricing model isn't actually a subscription, the second option might make more sense (and you don't have to handle webhook events), but the first option lets Stripe take care of the trial period, which is nice.

Upvotes: 1

Related Questions