#tomasfejfar

1 messages ยท Page 1 of 1 (latest)

harsh nightBOT
unique hamlet
#

Hi there!

#

No it's not possible directly. But you can try to create an off_session PaymentIntent with on on_session payment method, and there set setup_future_usage: off_session.

fossil hill
#

So we (maybe) can do without "forgetting" the card, but customer on-session action (payment) is required, right?

unique hamlet
#

Basically if you want to make a payment with an existing PaymentMethod, just try to make the payment (and set setup_future_usage if you want to update that value).

fossil hill
#

The payment needs to succeed to actually set up the future usage though, right? (e.g. must be done on-session for card setup with on-sessionfuture usage)

unique hamlet
#

Nope. Let's imagin you have an on_session PaymentMethod, and you create an off_session PaymentIntent with that PaymentMethod with setup_future_usage: off_session. There are two options:

  • The payment will succeed
  • The payment will require 3DS. In this case you ask your customer to come back to your website/app to re-confirm the PaymentIntent and go though the 3DS flow
    In both case now the PaymentMethod will be off_session
fossil hill
#

Sorry for not being able to articulate my case clearly.

  • customer saved their card with the last payment when they topped-up
  • now customer wants to set up automatic top-ups when their credits are insufficient

Expected:
They check a checkbox somewhere, I don't need to actually charge the card. At this point they may have enough credits and don't want to get charged

Actual:
They need to actually top up something. I'll create an on-session top up with the stored card and include the setup_future_usage:off-session. When the intent is sent (regardless of whether it succeeds or requires 3DS), the card's future usage is updated.

Is my understanding correct pls?

unique hamlet
#

So you just want to save a payment method for later, without making a charge right now?

fossil hill
#

Yes. Or rather update saved payment method without the charge.

unique hamlet
#

So just wait, and when you need to charge the card, try to charge the card.

fossil hill
#

Ahaaaaah! Now I got how you meant that. Thanks for the patience! ๐Ÿ™

violet cradle
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

fossil hill
#

I'm fine to implement this now, I guess ๐Ÿ™‚ So no followups so far! Thanks for the help.

violet cradle
#

Cool!