Roman Mishiev

Joined

810 Experience
8 Lessons Completed
0 Questions Solved

Activity

Posted in How to use Stripe Checkout in Rails Discussion

Hi Chris! Thank you for the super timely tutorial! Everything work fine and I have only one question:

How do I add a trial period to a subscription checkout request?

def show
current_user.processor = :stripe
current_user.customer
@checkout_session = current_user.payment_processor.checkout(
mode: "subscription",
line_items: "price_11111222223333344444",
-> TRIAL PARAMETER GOES HERE
)
end

Is there a way to do this somehow?
Thanks!

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.