#RGRTHAT-react-loadstripe
1 messages ยท Page 1 of 1 (latest)
const stripePromise = loadStripe('pk_test_51Ibqq9HkK6xmnAQCdPN05viVe23AFsutDHHffaMf2BuGOLSx0PJCbFiNFelrJYQ8f6mgO8UlUdEjlUObVty6agbM00NigE2yFi', {
stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}'
});
``` this is from docs
Hi there ๐ I'm not sure how to do that off the top of my head, but if you're working with Custom accounts then we recommend that you use destination charges (where you specify the destination account in each request) rather than direct charges.
https://stripe.com/docs/connect/charges
yes looks like transfer is better in this case. instead of money flow going directly to the connected account
Awesome. In that case you would just call loadStripe as your platform, and then specify the destination for each payment when you create the payment intent.
I have a question regarding stripe elements. How can I let the user get autofill suggestion in their browser when filling card details
cuz currently u have to manually write the card number again, which is pain for users
is this something that automatically fills over time in prod, or how does that work?
maybe this is a browser thing, and not stripe thing?
@viscid rose its quite some friction having to manually write
I use "Card Element"
custom payment flow
I'm not sure off the top of my head and will need to do some digging.
looks like i might have to create customer first
and then set automatic_payment_methods
Automatic payment methods is a very different piece of functionality.
It tells Stripe to detect what payment methods to use, but if you're using the card element(s) then card is the only payment method you should be working with anyway.
oh i see
but I wonder, with stripe card element, is it the browser that is responisble to suggest card details? or is this stripe?
cuz sometimes for example "safari" can save details for autofill, but not sure how this works here
i want autofill card details on phone for example.
Preferably also 1 click pay, but not sure if me using "custom payment flow" have this built in functionality
Card Element would rely on the browser's autofill. Our Checkout Sessions have prefill capability driven by Stripe.
When you say you want to autofill on phone, are you referring to a mobile app or someone accessing your site via a mobile browser?
Also, I haven't found anything that would block the card element from autofilling payment info from the browser. Is auto-fill enabled in your browser, and do you have a card added to it?
if someone visit my website on phone in a regular browser, i want the card element to be autofilled
i suppose the autofill will be suggested on a non-localhost website, non dev mode
cuz these autofills are based on domain urls i think
they are saved based on what domain/website u have been to ofcourse
so i dont get suggestions in dev mode
@viscid rose I dont have a card connected to safari
I think that's the old way autofill worked. If you inspect the card element you'll see that it's autocomplete parameter is set to cc-number so the browser will look to autocomplete with credit card info.
but i wanted it so that, if I use 4242 4242 4242 424, that stripe one, it one suggest it the next time
i have autocomplete enabled in safari
I see
My autocomplete always prompts me for the cards that I have saved in 1Password
Maybe in prod mode, safari asks if u want to save the card that u used
i have no cards saved now. But when i type in the default stripe testing number, i dont get asked by safari to save card to safari
but it might do that in prod idk
that would be great
@viscid rose I added a testing card to safari, and the autofill worked ๐
My teammate was doing some testing (though with Chrome) and said it only worked when using HTTPS
yeh that was what i was thinking
I suppose its also recommended to create a customer when someone pay for something
um. need to think about that
nvm lol
Haha, yeah Customer creation is going to largely depend on your flow. If you're using the Card Element then there won't be drastic benefits to your customers, though it may make things easier for your to track/analyze on your end.