#tom-portal-upgrade
1 messages · Page 1 of 1 (latest)
Hi 👋
How are your customers selecting a different product?
Directly in our app and we use the subscription update endpoint to remove the old product (item) from the subscription and add the new one
Okay so you should be able to determine if the customer has a Payment Method configured. Either as a default on the Customer object: https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method or on the Subscription: https://stripe.com/docs/api/subscriptions/object#subscription_object-default_payment_method
exactly and as I said there isn't one because the customer does not have to enter one because of the promo code. So question is how can we collect a payment method from the user for the subscription?
Well you can collect the payment method before you update the Subscription https://stripe.com/docs/payments/save-and-reuse
Or you could wait until the Subscription is updated and that will generate a latest_invoice.payment_intent that you can use to collect the Payment Method
Ok, would that point the customer to directly to paying the invoice? Because unfortunately this is not an option for us as we have some custom invoicing logic so the customer does not see any stripe generated invoices.
There is this "Share Update Payment Link" in the UI on the subscription page. Can I somehow access this link also via API? (Subscription: sub_1NJedUDfndcANrIo9Mf7ZhVM)
Wait, hold on.
So you don't want to use any Stripe UI to pay the invoice?
no, we basically use the Checkout Session for creating subscriptions and listen to the invoice.paid event to create custom invoices which will be send to our customers.
Okay so you just don't want to send Stripe generated Invoices to your customers?
yes
You can collect payment without sending the invoice
but wouldn't they see the stripe generated invoice or only the "open amount" to pay?
If you are only using Stripe Checkout and do not have any payment collection on your own UI then you might want to use Checkout Sessions in setup mode to collect new Payment Methods or use the Customer Portal and allow your custoners to add new Payment Methods.
Checkout: https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=checkout
Customer Portal: https://stripe.com/docs/customer-management/activate-no-code-customer-portal, https://stripe.com/docs/customer-management/configure-portal
ok, if I use the first approach (checkout session) would this payment method then automatically used to pay the overdue subscription (invoice) or do we have to explicitly trigger that after the checkout session
You would need to update the Customer or the Subscription record to use the newly generated payment method
ok, and one last question: As I mentioned before there seems to be a "Share Update Payment Link" in the UI on the subscription page. Can I somehow access this link via API?
I'm not sure what UI you are referring to
Ah the dashboard. No that isn't a link that is accessible programmatically
hmmm, ok, understand. Ok thanks for your help. I will try to work with the checkout session in setup mode
Great, I hope it works out for you.