Skip to content

Recommended user onboarding and subscription flow #1066

Answered by excid3
clayton asked this question in Q&A
Discussion options

You must be logged in to vote

You have to associate things with the Stripe Customer ID in the database so Pay can sync webhooks for the customer. If you're not providing a Stripe Customer ID to the pricing table, it will create a new customer each time. Pay will see the webhook but not a matching customer so it will ignore it.

Recommend reading Stripe's documentation for how things work: https://docs.stripe.com/payments/checkout/pricing-table#customer-session

I just added a customer_session method to handle this for you:

class PricingController < ApplicationController 
  def show
    # sets Stripe as the payment processor which lazily creates a Stripe Customer when you use it
    current_user.set_payment_processor(:st…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by clayton
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants