Closed doutatsu closed 2 years ago
trial_ends_at
extra_billing_info
for EU customers and is applied to all receiptsCard details are stored so we know what the default card that would be used on a new subscription if you didn't enter a new one.
In which case would it get stored exactly? When I went through checkout to setup a subscription, card details got saved on charges
, but not on the user
itself. But makes sense for the other cases you mentioned
I suppose I shouldn't worry about it and just make a separate model to make a billable, as my issue here was just having too many fields on the User
itself
Using Stripe Checkout for a subscription won't set the default card on the Stripe Customer, as far as I know. It just sets the payment method for the subscription itself.
Pay isn't really made for that situation at the moment, which is why we're going to add a PaymentMethod model to keep track of all the payment methods.
Sorry, I lost you - what specific situation? In my case, I am just using Pay for subscriptions -> setup a subscription through checkout and then using billing portal for any management, that's about it. For which it seems to work just fine as far as I can tell so far
Checkout won't set the Customer's default payment method afaik. It just sets the payment method for the subscription.
Ah, right, I've noticed that. But that's not a huge issue, the subscription would still be renewed correctly, as a card is associated with a subscription. The only issue, is that the person would need to type in their card details again, if they want to subscribe to something else, for example?
There is this under the customer
docs for Stripe Checkout Sessions: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
You can set payment_intent_data.setup_future_usage to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.
It doesn't seem like that would set it as default, but you would at least have it saved on the Stripe Customer. Then you could set the default card on the checkout completed webhook I guess.
And I don't know much about this, but Link with Stripe works like Shop Pay from Shopify where you can have your card saved. https://support.stripe.com/questions/using-link-with-stripe-to-save-your-payment-information
I was curious what is the need for adding fields apart from
processor
andprocessor_id
, when runningrails g pay User
? I understand the need for those, as we need to storeStripe
customer id, but isn't havingsubscriptions
andcharges
tables is enough for the rest of the fields?When subscribing, card details and trial info are stored on the other tables, but not on the user. only
processor
andprocessor_id
are changed.Hence I've been wondering if it's safe to remove all, but
processor
andprocessor_id
from theusers
?