#scene
1 messages ยท Page 1 of 1 (latest)
Hello! Where did you leave off in the last thread? Do you have some new questions I can help answer?
Hello, thanks a lot yes I'm trying to grasp the idea how to get this done appropriately with Stripe
As I understand I'll want to use: payment_intent_data in Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data
Yeah, you specifically will want payment_intent_data.transfer_data (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-transfer_data)
I want to collect payment using Stripe checkout because it has worked pretty well for us with other applications and then I need to automatically split the funds before entering in our Stripe account
so the mayor part goes to express account (a business listed in our application) and the rest of it goes to our Stripe account
Yeah, you can use payment_intent_data.transfer_data for that. You'd set payment_intent_data.transfer_data.destination to specify which connected account you want the funds to go to and you'd set payment_intent_data.transfer_data.amount to specify how much
That's not what I mean, but that's certainly one way to do it
The way I'm takling about will create the Transfer automatically for you when payment is successful
The way you're doing it in your code is creating the Transfer in a seaprate request
Both work!
perfect, your way is what I need not this solution that I shared ... I just can't find the code for your solution yet
could you share the code for your solution?
We don't have tn exact sample for it - but you should be able to get it working based on the API reference I shared!
Here it is again - https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-transfer_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Do you mean this part?
Yes, you can see the nexted params there that you need
Ok let me see if I get it; so I just have to set the parameters after the mode parameter?
so the next parameter would be payment_intent_data.transfer_data.destina
payment_intent_data.transfer_data.destination
and after that payment_intent_data.transfer_data.amount
yes
ok that's simple, that's very nice
this app is similar to Thumbtack
basically businesses get listed
we create a express account per business
stripe then has to approve it (is this correct?)
Yes, Stripe would have to verify the account based on the information provided
ok perfect, this information is provided using the Stripe connect API right?
Either the Account API or by the user providing it during the hosted onboarding flow
hosted onboarding flow would be creating the express account for the business?
sorry for the many questions, I really appreciate the hepl, I'm alone developing this I've done only Stripe checkout integrations
We talk about the onboarding flow in this doc: https://stripe.com/docs/connect/express-accounts
Basically you'd create the express account through the API and then redirect your user to a hosted UI that collects all the necessary info from them
Yes, I'm aware of this documentation and demo example
๐
for the express accounts on the backend I'm planing to do something like this:
Is this correct?
Yeah that looks fine to me - but really the best test you can do is running the code and making sure it works!
yes the code is not a problem is just the logic and the selection of the right Stripe methods that I want to confirm
I have CS background so that's ok about programming it ๐
I'm just looking to confirm selecting the right Stripe methods and the flow
๐ Taking over the thread, catching up now
I'll have to display the express account status and create logic for it to allow businesses to start selling services once the status is approved, is there documentation for the status to know the payloads that Stripe will be returning?
Hi @whole forge thanks a lot, I appreciate the help from both of you
hopefully I'm not being too annoyful with silly questions
After the express connected holders complete the onboarding, they will be redirected to return_url. Your system will then make an Account Retrieval request to check the value of charges_enabled. For the Account object, its parameters can be found here: https://stripe.com/docs/api/accounts/object
You can find more information here: https://stripe.com/docs/connect/express-accounts#handle-users-not-completed-onboarding
Thanks, to create the express accounts would be using the stripe.accounts.create right?
Yes, I'd recommend checking this guide for the Express account creation: https://stripe.com/docs/connect/express-accounts