stripe-paymentsrecurring-billing

How to setup paid trial in stripe?


I am building a Monthly recurring plan of $25. Now when user sign-up I want to charge $1 and start 14 days trial. After trial ends, it should automatically deduct pending amount ($24).

For example, User does signup on 1st Aug. He will be asked to pay $1. After succesful payment, 14 days of trial will get start. On 15th Aug, $24 should be deducted from his card . Again on 15th Sep he will be charged $25, so on and on...How to achieve this in stripe?...As stripe only provides free trial. I saw online not but not getting exactly how to do it.


Solution

  • One way of modeling this is to,

    1. Save customer's payment method for future payments by using SetupIntents
    2. Then you'd want to charge the payment method $1 by using a PaymentIntent
    3. Once you charge them $1, issue that amount as a credit (why though? Just hold on, I'll explain in step 5)
    4. Start/Create a subscription on August 1st with trial period (i.e. set trial_period_days = 14)
    5. Once the trial_period_days are over, Stripe will attempt to charge the customer's payment method for the initial invoice which is usually the full amount of the product customer is subscribed to. So in this case, $25. But since we issued a credit in Step 3, The customer balance of $1 would come into play and the initial invoice amount would reduce to $24 :) (This should occur on August 15th as we've set trial_period_days to 14)
    6. Since this is a monthly subscription, the renewal will fall on Sep 1 and with no credit balance left, Stripe will charge the full $25 amount.

    Edit: You may want to look into changing billing cycle anchor according to your need (i.e. charging the sub on 15th instead of 1st)