#jarek-contractor-payment

1 messages · Page 1 of 1 (latest)

abstract troutBOT
junior crown
#

I came across on_behalf_of but its unclear on whether that's what we need

peak glen
#

jarek-contractor-payment

junior crown
#

Contractors will create a Stripe account via Connect

peak glen
#

@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 🙂

junior crown
#

Yes, now I'm down to the details ha

peak glen
#

What type of connected accounts will those contractors have?

junior crown
#

Express

#

Contractors will accept payments from our Customers

peak glen
junior crown
#

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.

peak glen
#

See the doc I just linked you to which covers this in complete details. It walks you through this end to end already

junior crown
#

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?

peak glen
#

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

junior crown
#

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,
},
})

peak glen
#

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

junior crown
#

Yes, we already have charges for fees

peak glen
#

sounds good!

junior crown
#

Thanks!