#jarek-contractor-payment
1 messages · Page 1 of 1 (latest)
I came across on_behalf_of but its unclear on whether that's what we need
jarek-contractor-payment
Contractors will create a Stripe account via Connect
@junior crown What you're describing is related to our Stripe Connect product. It lets you accept payments on behalf of other entities (individuals or companies). Those would have their own Stripe account connected to your platform and then you can charge
ah okay you know all that 🙂
Yes, now I'm down to the details ha
What type of connected accounts will those contractors have?
Perfect so in that case you want to use Destination Charges: https://stripe.com/docs/connect/destination-charges and John (the customer) can pay Jenny (the contractor) that way
Ok, how do we set the account, where the funds are coming from (the customer)?
It seems like this would come from our account? But we want it to come from our customers account.
See the doc I just linked you to which covers this in complete details. It walks you through this end to end already
Ok I'll read through thanks
"By default, creating a charge with transfer_data[destination] makes the platform the settlement merchant. You can change this behavior and make the connected account the settlement merchant by using the on_behalf_of attribute on the charge."
Do both accounts need to be Connect accounts?
I'm just wondering if our Billing customers need to also have a Connect account?
For example we create customers with https://stripe.com/docs/api/customers/create
Customers represent people who pay for a service.
Accounts represent entities that receive payments/funds and offer a service
transfer_data[destination] and on_behalf_of should be the connected account id, the contractor that is receiving the money
Got it. So if I'm understanding, this should work
let paymentIntent = await StripeClient.paymentIntents.create({
customer: ourCustomersId,
currency: 'usd',
amount: amountInDollars * 100,
payment_method: default_source as string,
receipt_email: email!,
description,
transfer_data: {
destination: theContractorTheyrePayingId,
},
})
yes that works and will transfer the funds to that contractor's Stripe account's balance. Careful you (the platform) pay the fee so here you would end up with negative money if you don't keep some amount for yourself
I recommend reading https://stripe.com/docs/connect/destination-charges#transfer-amount and looking at the diagram for the flow of funds
Yes, we already have charges for fees
sounds good!
Thanks!