#Jonas Reif-reuse-payment-method

1 messages Β· Page 1 of 1 (latest)

desert vector
#

Hi πŸ‘‹ please bear with me a moment while I double check if Checkout Sessions can save payment methods like that.

#

I believe the parameter that you're looking for is payment_intent_data.setup_future_usage which allows you to tell the Checkout Session's underlying Payment Intent that the provided Payment Method should be set up to be reused.
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage

Since you're talking about using this for a Subscription, you'll want to look into setting that parameter to off_session.

wooden basin
#

Ok thanks for the link.

But when setting this parameter, then all payment methods which do not support the future usage will not be shown (or stripe checkout will not load) - but we want to also show klarna, sofort and other payment methods

#

Is there a way/setting to setup some payment methods for future usage, and others not?

desert vector
#

Ah, good point. No there isn't a way to set that parameter on a per-payment-method-type basis.

Checkout can prefill a customer's payment details if certain criteria are met, and I'm looking for the documentation that talks about that in more detail.

wooden basin
#

ok.
But if we do not want a checkout form, could we somehow use the payment methods?

Imagine we just want to show a button "Click here to subscribe to all for xx$"

desert vector
#

If you try to handle everything behind the scenes like that, then you'll want to use a payment method that was already optimized for off-session payments. You would also run into problems if you try to reuse single-use or on-session only payment methods.

#

I think the easiest approach would be to include the subscription in the one-time purchase checkout session rather than having two separate transactions, but that removes the buy-then-upsell approach that you described.

wooden basin
#

ok let me think about it. I will get back in 1 hour

desert vector
#

Sounds good, I'll think on it some more and see if I can come up with a cleaner apporach.

wooden basin
#

Ok.
Yes thats unfortunately not what we really were looking for...

We kind of need a way where we can set the future_usage / off_session for each payment method individually.

So that the flows looks like:

Example 1:

  1. User makes payment with "sofort" / "klarna"
  2. User has to add another payment method to make the upsell to the subscription

Example 2:

  1. User makes payment with "paypal" / "card"/ "sepa_debit"
  2. User can make a one click upsell to the subscription
dusty magnet
#

Hi there πŸ‘‹ I'm taking over for Toby. Give me a minute to get up to speed

wooden basin
#

Yes. I dont want subscription upsells.

I want the upsell on the thank-you-page / another page

dusty magnet
#

Let me know if you have any questions about specifics though. Happy to assist

wooden basin
#

The first purchase is a one time product. And as upsell we want to offer a subscription...

dusty magnet
#

Ah, okay, and you don't want them to have to re-eneter their payment details I assume?

wooden basin
#

Yes correct

#

Maybe it's somehow doable when we build a custom checkout page with stripe elements? But I think there we will have the same problem, that when we enable "future_usage" that some payment methods are not visible

#

I have to leave for today.

Would be really happy if you have any ideaπŸ™Œ