#fredmartin
1 messages · Page 1 of 1 (latest)
@zenith mauve let's chat here!
stripe.checkout.sessions.create does not recall the payment method ðŸ˜
ok
In order to display the page (to change the quantity), I pass subscription_data: {
metadata: {
quantity: {quantity},
customer_id: {customer_id},
subscription_id: {subscription_id},
},
},
The page displays but the payment method is not recalled
I must set a new card
How can I do ?
Okay, I'm not quite sure I follow. Can you summarize what you're trying to do in 1-2 sentences?
ok :
I call stripe.checkout.sessions.create to create a subscription with an adjustable quantity
It works fine : the quantity is collected and the card informations too
Now, I want the customer to be able to modify the quantity
I call the same function (stripe.checkout.sessions.create), but this time, I pass the subscription_id in subscription_data (see previous message).
It works, but I was expected that the Credit card was recalled.
Which is not the case
Creating another Checkout session will result in the creation of a second subscription. It's not possible to update an existing subscription using Checkout
If your goal is to update an existing subscription, you'll want to either build your own frontend and make a call to update a subscription: https://stripe.com/docs/api/subscriptions/update
or integrate with the customer portal and allow customers to manage their subscriptions on their own: https://stripe.com/docs/customer-management
Thank you, customer portal is the solution. However, I cannot explicitly set a payment method because it is linked to the payment methods configured with the account.
How can I remove Credit cards from payment methods, I can not.
I already have Sepa debit and want to remove Credit Card
but there is no option
Just to be clear, you don't want customers to be able to pay by card at all?
I want the customer to pay only by sepa debit
So I want to remove Credit card from payment methods
As it is not possible to do it via code (I think), I want to do it via this gui
But I don't see any "desactive" button
Okay, let's take a step back. Are we still talking about subscriptions in the context of Checkout? If so, you'll want to start by creating a Checkout Session with payment_method_types: sepa_debit: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_method_types
Not anymore, checkout works fine and yes, I can explicitly set a payment_method=["sepa_debit"]. It works fine.
Now, to make the customer update his quantity and payment information, I try Customer Portal (based on your suggestions).
Good direction, however there is no payment_method=["sepa_debit"] like for checkout.
Customer Portal seems to be display the payment methods configured in my Stripe account
And in my Stripe account, I cannot remove Credit Cards
Got it. I don't think the customer portal is the best solution in this case then. It's possible to configure the portal but only to enable/disable the ability for customers to update their payment methods. It's not possible to enable/disable specific payment method types for use within the portal
This means you'll want to create your own form that integrates with Stripe Elements to collect new SEPA debit details from your customers and then use this to update their existing subscription
OK, it is a bit disappointing because Customer Portal works 99% as I imagined, expect that it collect Credit Cards and cannot be configured like Checkout. The whole interface are perfect for collecting new quantities, billing informations and payment methods. Except for CC...