#sahil_best-practices
1 messages · Page 1 of 1 (latest)
đź‘‹ 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/1314547714180120618
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
are you trying to create/onboard a connected account, or accept a payment?
Hi soma!
I’m stuck currently at the pricing tables. I am able to go to the form and submit payment but I’m not being redirected back to my app
I currently have the redirect pointing to a AWS lambda function
After getting the details within my app I can do onboarding for connected account
so you are using the Pricing Table, and you want users to be redirected somewhere after they finish the payment?
Yea back into my app and have my db updated with the plan they signed up for
that's not possible. the pricing table just shows a confirmation page (that you can customize), but not redirect users.
Oh ok is there anyway to add a button or something to navigate user?
you could add a link in the confirmation message:
Oh ok cool do you know if I can put html code or is it just text? Just so that the url is hidden and the button says next or something like that
just text and links.
Ok because my url has locationID and would be very long, but that’s fine I’ll try to do something with that. Glad to know that it doesn’t redirect because I would’ve wasted a lot of time on trying to get that to work lol
So the next thing is what’s the best way to setup the connected account after the user selects a plan. They would be in my app now and I would display a button that says setup connected account? And then it redirects to stripe again to collect all the info? Does that also not redirect back when the user is done?
to create/onboard a connected account:
- use the API to create the account https://docs.stripe.com/api/accounts/create
- then create an Account Link, and redirect the use to the URL to do the onboarding: https://docs.stripe.com/api/account_links/create
Ok thanks! And once that’s setup I have a user facing app which allows users to order from each restaurant so then I would just pass that stripe connected ID to a payment intent right? The connected account does not setup any products in stripe all that is handled in my db and so I calculate the total price and all that and show a stripe payment sheet to the user? Will that be able to create a card and add it to a wallet? And also do I need to create the user’s stripe account as soon as they create an account or will placing the first order automatically do that?
I would just pass that stripe connected ID to a payment intent right?
it depends what type of charge you plan to create: https://docs.stripe.com/connect/charges
so I calculate the total price and all that and show a stripe payment sheet to the user?
what do you mean by "payment sheet"? what exactly are you using to accept payments?
Will that be able to create a card and add it to a wallet?
not sure what that means
And also do I need to create the user’s stripe account as soon as they create an account or will placing the first order automatically do that?
I don't understand that either. can you share a concrete example of what you mean?
I think the destination charge is the right option. Since the User will interact with my app to order from the connected account(like DoorDash)
So with pricing table once the restaurant picks a plan and makes a payment it automatically creates a stripe account. I think I can use that account to create the connected account right?
For the payment sheet I was thinking of something like this (https://docs.stripe.com/payments/accept-a-payment?platform=react-native) where my app is still in the background and the user can make a payment. Once they do that will it automatically create a stripe account as a user so that the payment method can be saved to a wallet so that they can use the card in the future? I would also have a place in my app settings that would say manage payment methods which will then again show a stripe screen with the wallet(payment methods) for the user to edit
I think the destination charge is the right option. Since the User will interact with my app to order from the connected account(like DoorDash)
makes sense
So with pricing table once the restaurant picks a plan and makes a payment it automatically creates a stripe account. I think I can use that account to create the connected account right?
you are talking about two completely different things. when you accept a payment, a Customer object might be created. but this has nothing to do with an Account object.
Once they do that will it automatically create a stripe account as a user so that the payment method can be saved to a wallet so that they can use the card in the future?
it won't create a Stripe Account no, it might create a Customer account. and yes you can save a card on a Customer object.
Oh ok so for the connected account the pricing table returns a customer object right? Do I need to use that for creating the connected account at all or is it just for my purposes in tracking monthly payments? As in the id or any of the information for the customer object is not relevant for anything else going forward right?
Do users like common people ordering need to have a stripe account or do they just stay as customers?
Oh ok so for the connected account the pricing table returns a customer object right?
it doesn't return anything no
Do I need to use that for creating the connected account at all or is it just for my purposes in tracking monthly payments?
a Customer object and a Connnected Account object are completely separate. the Customer object is not relevant when creating a Connected account.
Do users like common people ordering need to have a stripe account or do they just stay as customers?
no, you only need a connected account if you want to send money to the user.
if your goal is just to accept payments, then you don't need connected accounts at all
Ok cool sounds good 👍 so I think my next step is to just get redirected back to the admin dashboard and create the connected account then create payment intents from the user app to make a payment to the connected account
Yea the user app can stay as a customer but the restaurant needs the connected account so the user can pay them
Oh and also another thing. Instead of me having to pay the stripe fees how would I set it up so that the connected account pays the fees? It looks like destination doesn’t support that?
Instead of me having to pay the stripe fees how would I set it up so that the connected account pays the fees?
that's only possible when using Direct Charges
Would it make sense to use a direct charge then? It seems like both would work, but the only thing is the connected account sets up all the products on my dashboard and I manually calculate the price …the only thing I need the connected account for is to get a payment from the user and make sure it goes to the right restaurants account
It would also be great if the restaurant could choose whether to pass the fees onto the user and so in that case I think destination would be the right choice?
Depends on the use case really. They differ completely and depending on your business the likelihood is that one type of payment is better suited than the other: https://docs.stripe.com/connect/charges#types
I’m thinking destination but I was hoping to have the restaurant or user cover the stripe fees
You can have more fine grained controls over accounts: https://docs.stripe.com/connect/migrate-to-controller-properties
I see, but it looks like the fee payer would be either me or the connected account, not the customer right?
If you want to pass the fee onto the customer (aka surcharging) then you need to build that into your payment calculations. We don't support that
I think maybe I should have a db value to determine whether to add the fee to the users total and then have the connected account pay the stripe fees either way right?
Ultimately our fee(s) are deducated from a Stripe balance transaction (payment). Whether that is on the platform or the conncted account you can configure
If you want the customer to pay that, then you'd just bump the payment fee by a set amount to cover it
Ok cool that makes sense, so destination charge would probably be the easiest way in my case? And also how would I calculate the fees, is there a way to detect the card type and adjust the total on the payment sheet?
I can't really advise you on the types of payments you should be doing. Instead read the doc I linked to comprehend the full differences and how that may impact your business (i.e. refund and dispute liability, etc) and make an informed decision
is there a way to detect the card type and adjust the total on the payment sheet?
Depends what you mean by 'payment sheet' specifically? Looks like you're using a flavour of Checkout?
Generally calculating exact fees is hard as it can vary depending on payment method, card country, etc. Our general recommendation is to apply a general 'processing fee' that scales with the payment amount
So like 3% + 30 cents? This is US only app so I think that should cover most of the cards fees right? And the excess would end up going directly to the connected accounts or do the payments all come to me and then I pay out to the connected accounts and collect any excess customer fees?
Yea I think it’s called checkout…my app will still be visible in the background an a payment popover will show up for the user to select an existing card or input one manually
All depends on the type of payments you're doing. This are all introductory questions that are answered in our documentation
Ok I’ll go back and check that out. Another thing that I was wondering is there some sort of tab system where the fees aren’t charged at every transaction but instead added into a tab which gets paid out at a certain time like 4am or something?
I think the closest way was pre authorization when I was looking through the docs?
No that's not possible. The fees are always deducted from the gross amount at the time of the payment
Wouldn’t pre authorization work though? Like start at $100 and then when user exceeds that, make another api call to preauth to increase the amount? And then charge at the 4am time? I think I would have to keep track of the order totals.
Sure if you want. But as I said the fee isn't taken until you actually capture the funds
Also, not really sure what you're gaining by doing that other than adding more overhead for you
I’m building this for bars as well so they will have customers who order multiple times so a tab feature is important to have otherwise those 30 cent charges will be bad for their business
And incremental auth isn't available to all: https://docs.stripe.com/payments/incremental-authorization
I wouldn't really recommend auth/capture for that then. Just build some kind of order system internally that tracks what they've ordered and charge at the end
That's how bars work – they don't increment the auth amount each time you order a new drink
The issue with auth is that you can't do overcapture either. So you'd end up with an initial auth that's way higher than what you'd end up charging them
Ok so would I first have them setup a stripe customer account so that they can save the payment methods. Then internally open a tab in my app…I could have a button to close tab otherwise if they don’t close the tab then at a certain time run all the transactions?
Sounds feasible. But you run the small risk of the payments potentially requiring auth/3DS if they're off-session (e.g. customer has left the bar/restaurant)
I would guess that this is why all these similar apps (like W8r) charge customers at the time of order
Yea my only issue with that approach was if they don’t close the tab or delete the app…would need a way to still process that transaction that’s why I was thinking of preauth
Yes any auth would be required at pre-auth time
So incremental capture should be ok right? The user will be able to see individual charges on their cc app as they order and then at the end it will all get totaled up into one line item on their statement?
You can't do incremental auth as I explained – only available on IC+ pircing
The user will be able to see individual charges on their cc app as they order and then at the end it will all get totaled up into one line item on their statement?
No that's not how incremental auth works
Even If the user has already added the card to the wallet this would still be an issue? No other way to bypass this?
The save/setup authentication will optimise the card for those off-session payments, but not a guarantee that the bank won't still request 3DS/auth for some payments. Can and does happens do you need to be wary of that
So what does ic+ pricing mean? I really think preauth is the better choice because even if I keep track of the tabs and the user has a maxed out creditcard or no funds in the debit card and they end up spending like $1000 then preauth would have prevented that
You'd need to speak to support directly about pricing
Ok but what exactly does it mean why do you say it wouldn’t work?
What wouldn't work?
The incremental auth functionality (i.e. API parameters) are only available to accounts on IC+ pricing. If that's not your account, the API requests will error
Oh ok so is that a tier limit thing? How would I be able to get an IC+ account?
I just told you – you need to speak to support
Ok cool sounds good, and after that it should work as I’m expecting? That’s the best way to implement this tab system?
Ultimately that's for you to decide. I've explained some approaches and outlined the pros/cons of each. I don't know much about your business and what you're building really so I wouldn't feel comfortable recommending a specific way
Best to just build out a few PoC with the potential methods and run some trial scenarios!
The only drawback with the incremental is the ic+ account right. The other ones seem to have a major flaw such as not being able to capture the charge if the user deletes app or if user doesn’t have enough funds
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
Ok so it looks like Amex is not available…would it be possible to charge directly if Amex otherwise do incremental auth?
I'm not sure I udnerstand your latest follow up question sorry.
So I was planning on using incremental auth to create a tab management system that bars have and wanted to use this to get customer payments but not capture the payment right away but instead to use the preauth to authorize the card so that the user can order multiple times and only have the stripe fee charged once
Unfortunately, this channel is for technical integration questions only, and we don't know much how fees works actually. You should probably continue chatting with Stripe Support regarding this: https://support.stripe.com/contact
Yes this is regarding integration. I’m trying to figure out the best service that stripe offers to create a stab management system similar to how bars handle tabs for drinks
I understand that, ideally you should be talking to a Sales man and see how to optimize your fees collection.
Ok and regarding the pricing tables I have integrated that and now I’m trying to see how to redirect the user back to my app. I was told that this is not possible but here I see that it is
Yes you can redirect your Customer to your website:
https://docs.stripe.com/payments/checkout/pricing-table#:~:text=and whether to display a confirmation page or redirect customers back to your site after a successful purchase.
When you create a pricing table you have the option to display a confirmation page or to return the customer to your website.
Oh nice but will this also work with localhost?
Yes it should work.
Ok cool that worked thank you!
Great!
So now do I show the embeddable UI so that the user can switch plans directly from my dashboard? I also need to create a connected account for this user so i want to use embeddable ui to display the plan info but maybe use the express dashboard to then redirect to stripe if it’s possible to hide the plan subscription on the express dashboard. Not sure if it’s 2 seperate things though
And is it possible to send a unique key to the payment sheet and provide it to the checkout session complete event…I need to update my database and need to pass a id to help figure out which record to update
Send a key to the Pricing table*
do I show the embeddable UI so that the user can switch plans directly from my dashboard?
I'm not understand this part...
Not sure I understand to, but you probably you can use metadata in order to track this information
I was hoping to have a component like this that I can show in my dashboard otherwise I think update plan button and redirect to stripe if this is not an embeddable UI right?
This is a screenshot from billing portal, there isn't a hosted component that you can use like Pricing table.
Oh ok so I would have to redirect to update the plan right?
Yes, and you can use flows/deep linking with billing portal:
https://docs.stripe.com/customer-management/portal-deep-links
Ok cool so yea i think I’ll just replace the choose plan which displays the payment sheet with a update plan button and deep link it to that
Which fields are important to keep track of once the subscription is created and I don’t think I see a plan of which I can use to identify the plan that was chosen
You can look at the price id of the subscription to see which plan they subscribed to.
Ok cool so once I get the checkout.session.completed I save the subscriptionID and then make an api call to get the subscription object?
Yes
Ok cool I’ll add that to my db…anything else that’s important to keep track of?
That depends on what you deem is important
Changing subscription and figuring out which plan was chosen and if it’s still valid or if payment failed