#Slush
1 messages · Page 1 of 1 (latest)
Hi there
Have you seen our Separate Charges and Transfers doc: https://stripe.com/docs/connect/charges-transfers ?
Hey so this is actually going to change a lot of our business logic. So I would like to give you a quick rundown of what were looking for and what is the easiest approach you would take in this situation.
So we are a website that allows people to sell things on it. But we would like to take a transaction fee for every purchase on our website. So lets say someone sells a product on our website for example a pair of sunglasses. It costs $50. The website takes a transaction fee of $5. I need the $50 to go to the seller and the $5 to go to my account. What is the easiest way to go about this? Also what would the customer have to do to create their account to accept payments? I would like to make this as easy and painless as possible for the person who is selling the items on my site.
I have a database so I can store any stripe ID's associated with the seller account etc...
So you want to charge a customer $50 but then take a $5 fee and also transfer the $50 to the seller?
Or you plan on charging $55?
It would be in total $55.
$55 of it would be charged to the customer - $50 of it would go to the seller - $5 of it would go to us (the website owner)
This is what I currently have implemented : https://stripe.com/docs/payments/quickstart
Gotcha, then you don't actually need Separate Charges & Transfers as noted above.
What would be the easiest way to alter that code to allow this to happen ^^
You can simply do this with Destination Charges
Which are simpler
So you want to onboard Connected Accounts
Express is the easiest and what I would recommend here
Then you use transfer_data to determine how much you want to transfer and you keep the rest as your fee
Reading over this documentation now
Still a bit confused.
TransferData = new PaymentIntentTransferDataOptions
{
Destination = "{{CONNECTED_STRIPE_ACCOUNT_ID}}",
},
So I would add that into my code
Or I would add this into my code:
ApplicationFeeAmount = 123,
TransferData = new PaymentIntentTransferDataOptions
{
Destination = "{{CONNECTED_STRIPE_ACCOUNT_ID}}",
},
And then I set the Destination to the sellers account
And would the application fee amount go right to my account automatically?
Yep you set the destination to the sellers account. You can either take an app fee (yes it goes right to your account) or you use transfer_data.amount to specify how much to transfer and then the rest remains in your platform account
But if I use the ApplicationFeeAmount variable instead it will send that to me?
And the "Amount" Variable will be sent to that Destination Variable?
Yes that's correct
So the ApplicationFeeAmount does that subtract it from the "Amount" or is that added onto the Amount?
So if I set the amount to 2000 ($20)
And the application fee to 500 ($5)
Will the customer be charged $25 or $20
Also how do I get their CONNECTED_STRIPE_ACCOUNT_ID do I need to have them go to stripe.com and create an account and input the ID? What's the easiest way for my customer to input that into my website?
Hi there. Taking over for bismarck as they have to step out. The amount is always what the customer will be charged. Application fee is taken out of that. I recommend trying this all out in test mode, so you can get a feel for how everything happend.
For CONNECTED_STRIPE_ACCOUNT_ID, do they already have a Stripe connect account?
Not sure what that is.
Lets assume they have nothing related to stripe.
What is the easiest way for me to implement into my website so I can get theit stripe account id
their*
Do I put a text box somewhere saying "Go to stripe.com and register and then send me your stripe account ID"
Or is there a better way to do that?
Ah no. I recommend reading up on Stripe Connect first, as that's what you'll have to use. The first thing you'll need to do is to choose your account type: https://stripe.com/docs/connect/accounts
Once you've weighed the pros and cons of account type and you've chosen, you can click the account type you selected in that left hand navigation menu in the docs and read about how to onboard customers to that account type
Is it a pain to implement into my site?
Or is it simple?
It seems like express is what I would want to be using.
For express, I recommend starting here: https://stripe.com/docs/connect/express-accounts
Stripe-hosted onboarding makes the onboarding and verification process relatively simple
When you deal with creating Stripe accounts for your customers and having to verify their identity, it can get complex, but Stripe-hosted onboarding (that you can use with Express accounts) makes things simple
You'd want to use Destination charges with Express accounts: https://stripe.com/docs/connect/destination-charges
Yeah I am going to use destination charges
Just trying to figure out how the express accounts work.
I'd read the following in order:
- https://stripe.com/docs/connect/express-accounts
- https://stripe.com/docs/connect/express-dashboard
- https://stripe.com/docs/connect/integrate-express-dashboard
- https://stripe.com/docs/connect/customize-express-dashboard
- https://stripe.com/docs/connect/destination-charges
That should give you what you need to move forward
IS there any examples of this already implemented so I can see the code behind it and how it works?
For .NET
Which piece do you need to see an example for? Our docs should have code snippets for the relevant pieces
You can select .NET in each snippet
When I am looking at the express demo, I am seeing that their is a frontend to it collecting all the information and the backend handling it.
But on the document you sent me I am only seeing the backend code for it.
Im still a bit confused on how the express accounts work. Does it redirect them to a stripe page to create the account? Or do they actually put in all their business information and account information on my website?
You would create the account with an api call on your server and redirect the customer to a stripe-hosted account link to collect their info. That's all covered in the first link above
I really recommend reading through it first and then following up if you have any questions
Hey so I just read through it all and am starting to understand it.
The only question I have is on this page:
What is the difference between step 2 and step 3?
It seems like I only need step 3 to grab the link that I am going to redirect the client to right?
Step 2 is to create the actual account object. Step 3 is to generate a link that you can redirect the customer to. Then, Step 4 is to actually just redirect them
In step 3 where is it getting this from: Account = "acct_1032D82eZvKYlo2C"
That would be the id of the account created in step 2: https://stripe.com/docs/api/accounts/object#account_object-id
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So let me get this straight, I do step 2 and it will create a temporary stripe account id. Then instantly after that I do step 3 and input the Account = variable to be what was generated in step 2 (as well as set the refresh and return urls)
It's not temporary. It will create a Stripe Account object that will persist. It just won't be in a verified status. In order to verify and make the account active, the customer will have to complete their information at the account link. But yeah, you need to pass the account id of the object created in step 2 to the account link creation request in step 3
Ahhh!! Okay I understand.
So tell me if this sounds right to you:
- Create a button on my website saying "Create Stripe Express Account"
- Once that button is clicked I create an express account and store their account ID on my database and I also create an account link and instantly redirect them to the account link created by step 3.
- Check to see if their account was successfully verified by stripe after the redirect?
- If it was verified set a flag on their account that it was verified and their account is ready to accept payments, if they didn't complete the process keep that flag as unverified.
Hi there, sorry for the delay! Just catching up
Yep, still here! Just taking me a bit longer to catch up
The above looks correct! For step 3, you can make a request to get the account and look at the charges_enabled property: https://stripe.com/docs/api/accounts/retrieve
For step 4, yes, you can track this on your end. Then, instead of regularly retrieving the account details to confirm whether charges have been enabled, you can use webhooks to listen for account.updated events: https://stripe.com/docs/connect/webhooks
Yes I have a webhook already setup.
Also in step 2, how do I get the account ID from the code after the account was created?
Your server side code should create the Stripe account. Stripe will respond with the full account object, from which you can grab the account ID.
it'll be the id property: https://stripe.com/docs/api/accounts/create?lang=dotnet
Hi there, stepping in as roadrunner is away. Please give me some time to catch up here.
Hey basically all you need to know is I am trying to create an express account following this guide: https://stripe.com/docs/connect/express-accounts
I am trying to get the account id from step 2 so I can use it in step 3
Your code should look something like this:
// ...
Account account = service.Create(options);
// ...
var options = new AccountLinkCreateOptions
{
Account = account.Id,
Awesome thank you.
Can you explain to me the point of the account creation to get the account ID?
Why would I even bother storing that account id until I know they have verified it? As in, dont store the account ID if they create a account and dont verify it. This way if they come back again and do verify it, itll be a whole new account id?
Can you clarify this a bit? What do you mean by 'don't verify' it?
For example: I have a button that says "Create Stripe Express Account"
They click it, on the backend it generates them an account ID and redirects them to the express creation page. They decide they dont want to create the stripe express account right now and want to do it later. I NEVER store that account ID and they navigate off of the page. A few days later they come back and decide to create the express account. Instead of storing that account ID they attempted to do it with a few days ago, cant I just create them a whole new account ID and not store their account ID in my database until they have completed the verification to accept payments?
That is not advisable as you'd have so many abandoned account ids. Instead, you'd use the account id that you have already created.
Gotcha, understood.
Also I was able to create the account link and redirect the user to the accountlink page
But
Its not triggering my webhook
How would you suggest verifying to see if that account ID is ready for payments?
I have a webhook that I use for my paymentintents which works fine, but I saw no activity on it when doing the account onboarding
I see, with Account API, you'd need to look at https://stripe.com/docs/api/accounts/object#account_object-requirements-currently_due and as long as these fields do not appear in past_due as well, it should be enabled.
Yeah but I would need to wait for it to hit my webhook before I check to see if it was validated or is there a better way?
You could run a crob job on your to check the account requirements.
Hmm okay ill figure something out.
So how exactly do I use the account object to check if they are ready to accept payments?
accounts.past_due needs to contain nothing?
or is it account.charges_enabled = true?
And the way they enable charges is by basically linking their bank account up right?
And that flag would then be true?
Not necessarily, when the requirements are fulfilled then charges are enabled. There is also this, https://stripe.com/docs/api/accounts/object#account_object-payouts_enabled where it will look if Stripe can send payouts to the account.
So lets say the charges are not enabled and a payment intent tries to go to their account, will it fail?
That is correct, you can learn more about these here, https://support.stripe.com/questions/payouts-or-charges-not-enabled-for-custom-connected-accounts
Along with that lets say their charges are not enabled and I want them to enable it, do I just re-link them to the accountlinkcreateoptions onboarding link?
Then they can finish up their verification there?
With Express Connect, they will be able to login to their account to resolve this.