Roman Mishiev

Joined

1,010 Experience
10 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.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2023 GoRails, LLC. All rights reserved.