#david_code

1 messages · Page 1 of 1 (latest)

plucky sandBOT
#

đź‘‹ Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1408127653839372298

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

alpine mango
#

This is the part on the frontend:

<EmbeddedCheckoutProvider key={`${templateKey}:${quantity}`} stripe={stripePromise}
                                                  options={{fetchClientSecret}}>
                            <div className="rounded-md border">
                                <EmbeddedCheckout/>
                            </div>
                        </EmbeddedCheckoutProvider>
wary oxide
#

Saved digital wallet payment methods can only be charged for off-session payments, such as future subscriptions renewals or other payments initiated on behalf of the customer. If you need to charge a mobile wallet and the customer is present, you must use the Apple Pay and Google Pay integrations to re-prompt for payment method presentment

alpine mango
#

That means I have to ask him beforehand if he wants to use a saved payment method and which one, and then charge it on the server side, and if he doesn't want to use one, then he just checks out normally?

wary oxide
#

To clarify for compliance reasons and usage restriction requirements, Wallet Payment Methods gets saved with allow_redisplay=limited
They can be re-used for auto-renewing monthly subscriptions, but for on-session payments where the customer is present we are expected to have the user go through the Wallet integration flow provided by Apple/Google etc.

alpine mango
#

But can I use it later to make several one-time payments?

wary oxide
#

If the user is present, they're expected to go through the apple-pay/google play payment flow.

alpine mango
#

Now I’m confused… I thought I could make an off-session charge with any saved payment method, right?
And if that’s possible, then it should work if I ask the user before checkout: “Do you want to use a saved payment method?”
If yes: they pick one, and I create an off-session charge server-side with the selected method.
If no: I run a checkout where they save a new payment method.
Or is that not possible / where’s the flaw in my thinking?

wary oxide
#

off-session implies the user isn't present and not actively involved in the current payment transaction

alpine mango
#

and what would be the solution to my problem? Should i just allow card payments and by that lower my conversion rate?

wary oxide
#

Sorry, maybe i'm not fully understanding the question here.

So you have a user who is trying to make a one time purchase? They have access to the saved payments methods saved to their customer account through stripe. and the cards saved to the wallets they own (Apple, Google Pay, Amazon Pay)?

plucky sandBOT
alpine mango
#

So the user can manage payment methods in their settings — add, set default, and delete (cards, PayPal, Klarna, Amazon Pay, Revolut Pay). I set this up with a Setup Intent.
Now the idea is that every time the customer generates something, they have to pay for it. I’d like to use the stored payment methods for that.
And if they want to use another method that isn’t stored yet, or if they haven’t stored any, they should go through a normal checkout.

My problem is that when I try it the way I’ve done so far — simply creating a Checkout with the stripeCustomerId and the configurations to display the saved payment methods — it only shows me the cards, but not the other payment methods like PayPal, Klarna, Amazon Pay, or Revolut Pay.

oblique wasp
#

hi! fyi i'm taking over this thread - the server is a little busy at the moment but i'll get back to you asap!

alpine mango
#

Thanks for letting me know! No worries, I’ll wait for your update.

oblique wasp
#

ok, catching up now...

#

(mossy also gave me a lowdown but i need a second to digest everything, thank you for your patience 🙏 )

#

sorry for the delay, i'm all caught up. but yes unfortunately checkout only supports pre-filling card data, as documented here on our docs:
https://docs.stripe.com/payments/checkout/save-during-payment?payment-ui=embedded-form#save-payment-methods-to-prefill-them-in-checkout

You can use Checkout to save cards and other payment methods to charge them off-session, but Checkout only prefills saved cards. Learn how to prefill saved cards. To save a payment method without an initial payment, use Checkout in setup mode.

#

i don't think there would be a reason that you couldn't allow people to use other payment methods, but you can only allow them to select previously saved cards

oblique wasp
#

oo yes i missed that part - technically that would work but as mossy said the off-session flag is really only supposed to be used for payments that are actually happening off session

#

if you were to go down that road i would probably try confirming an on-session payment with stripe.js or something along those lines instead

alpine mango
#

Okay, i'll have a look at it thanks.

oblique wasp
#

yep of course! do you need help with anything else currently?

alpine mango
#

no thanks. if i do, i'll open another ticket :)