#sahil_best-practices

1 messages · Page 1 of 1 (latest)

covert yokeBOT
#

đź‘‹ 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.

woeful aspen
#

hi there!

#

are you trying to create/onboard a connected account, or accept a payment?

main sage
#

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

woeful aspen
#

so you are using the Pricing Table, and you want users to be redirected somewhere after they finish the payment?

main sage
#

Yea back into my app and have my db updated with the plan they signed up for

woeful aspen
#

that's not possible. the pricing table just shows a confirmation page (that you can customize), but not redirect users.

main sage
#

Oh ok is there anyway to add a button or something to navigate user?

woeful aspen
#

you could add a link in the confirmation message:

main sage
#

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

woeful aspen
#

just text and links.

main sage
#

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?

woeful aspen
main sage
#

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?

woeful aspen
#

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?

main sage
#

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

Securely accept payments online.

woeful aspen
#

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.

main sage
#

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?

woeful aspen
#

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

main sage
#

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?

woeful aspen
#

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

covert yokeBOT
main sage
#

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?

manic hawk
#

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

Create a charge and split payments between your platform and your sellers or service providers.

main sage
#

I’m thinking destination but I was hoping to have the restaurant or user cover the stripe fees

manic hawk
main sage
#

I see, but it looks like the fee payer would be either me or the connected account, not the customer right?

manic hawk
#

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

main sage
#

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?

manic hawk
#

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

main sage
#

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?

manic hawk
#

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

main sage
#

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

manic hawk
#

All depends on the type of payments you're doing. This are all introductory questions that are answered in our documentation

main sage
#

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?

manic hawk
#

No that's not possible. The fees are always deducted from the gross amount at the time of the payment

main sage
#

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.

manic hawk
#

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

main sage
#

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

manic hawk
manic hawk
#

That's how bars work – they don't increment the auth amount each time you order a new drink

main sage
#

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?

manic hawk
#

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

main sage
#

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

manic hawk
#

Yes any auth would be required at pre-auth time

main sage
#

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?

manic hawk
#

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

main sage
manic hawk
#

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

main sage
manic hawk
#

You'd need to speak to support directly about pricing

main sage
#

Ok but what exactly does it mean why do you say it wouldn’t work?

manic hawk
#

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

main sage
#

Oh ok so is that a tier limit thing? How would I be able to get an IC+ account?

manic hawk
#

I just told you – you need to speak to support

main sage
#

Ok cool sounds good, and after that it should work as I’m expecting? That’s the best way to implement this tab system?

manic hawk
#

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!

main sage
#

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

covert yokeBOT
steady coral
#

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

main sage
#

Ok so it looks like Amex is not available…would it be possible to charge directly if Amex otherwise do incremental auth?

steady coral
#

I'm not sure I udnerstand your latest follow up question sorry.

main sage
#

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

steady coral
#

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

main sage
#

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

steady coral
#

I understand that, ideally you should be talking to a Sales man and see how to optimize your fees collection.

main sage
#

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

steady coral
#

When you create a pricing table you have the option to display a confirmation page or to return the customer to your website.

main sage
#

Oh nice but will this also work with localhost?

steady coral
#

Yes it should work.

main sage
#

Ok cool that worked thank you!

steady coral
#

Great!

main sage
#

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

main sage
#

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*

steady coral
#

do I show the embeddable UI so that the user can switch plans directly from my dashboard?
I'm not understand this part...

steady coral
covert yokeBOT
main sage
#

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?

steady coral
#

This is a screenshot from billing portal, there isn't a hosted component that you can use like Pricing table.

main sage
#

Oh ok so I would have to redirect to update the plan right?

steady coral
main sage
#

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

silver lintel
#

You can look at the price id of the subscription to see which plan they subscribed to.

main sage
#

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?

silver lintel
#

Yes

main sage
#

Ok cool I’ll add that to my db…anything else that’s important to keep track of?

silver lintel
#

That depends on what you deem is important

main sage
#

Changing subscription and figuring out which plan was chosen and if it’s still valid or if payment failed